On Ubuntu 22.04, I could not tame Vim to highlight...
# getting-started
a
On Ubuntu 22.04, I could not tame Vim to highlight syntax for Kotlin files (.kt). But it works fine for .java files. Anyone aware of workaround?
j
Use an actual IDE ? 🧌
Joke aside, I don't know of a workaround for vim but you could use IntelliJ with vim bindings if that's your thing. I guess writing in Kotlin shines best with proper tooling because it's a very tooling-friendly language
s
JetBrains (which created Kotlin and IntelliJ) isn't interessted in supporting other IDEs much, which is why you'll get the best developer expeience with IntelliJ/AndroidStudio even in the community versions. Every other IDE has to develop syntax highlighting on it's own, though I heard the the community driven Kotlin Language Server was recently updated to Kotlin 1.8(!?) (but that doesn't include syntax highlighting but refactoring/jump to declaration).
r
Haven't tested but a quick search suggested https://github.com/udalov/kotlin-vim
👍 1
a
This one worked. Thanks. I mostly use the Intellij IDEA for writing. Sometimes I use Vim to make sure I remember the keywords and syntax without IDE's help for interview prep etc
y
Interviews likely will let you do the problems on an IDE. it's very outdated to have whiteboard interviews nowadays, especially for a tooling-oriented language like Kotlin
130 Views