Skip to content(if available)orjump to list(if available)

Kotlin-Lsp: Kotlin Language Server and Plugin for Visual Studio Code

eitland

Great!

As much as I love Kotlin and have a great deal of respect for JetBrains, I’ve always preferred the other Java IDEs over IntelliJ. The fact that choosing Kotlin—which I genuinely do prefer—effectively locks you into IntelliJ for the foreseeable future has been one of the main reasons I’ve hesitated to recommend it unreservedly for every project.

Just to be clear: I think IntelliJ and the rest of JetBrains’ tools are excellent and absolutely worth the price. I simply happen to prefer the alternatives—and they happen to be free. That said, I realise this is very much a personal preference, and one that most others don’t seem to share.

gengstrand

Kotlin does not lock you in and has not locked you in to IntelliJ. About a year ago, I coded up a Kotlin service using VS Code. See https://glennengstrand.info/software/coding/csharp/kotlin for my description of that including how nice the developer experience was under VS Code. The plugin I used was https://github.com/mathiasfrohlich/vscode-kotlin which works like a charm.

arunix

What are the IntelliJ alternatives you prefer?

eitland

NetBeans was my go-to IDE until I started working with Kotlin, which more or less forced me over to IntelliJ. I’ve also tried VSCode on some pure Java/Maven projects since then, and found that it shares some of that same feel—more lightweight and direct, which I’ve always quite liked.

wejick

No offense. Has been years I don't see people using NetBeans. Made me check the website, surprised that the latest release is like just yesterday.

travisgriggs

I think it’s admirable that there’s a generic language server for Kotlin. Others, such as zed can benefit from this as well.

That said, I would much rather use AndroidStudio for Kotlin. Hands down. I use VSCode only when I can’t find something better. I recently switched my Elixir dev to Zed and am happy with that. Pretty much only thing I choose to use VSCode for these days is my ansible setups. Otherwise:

- Pycharm -> Python

- Xcode -> Swift

- Android Studio -> Kotlin

- Zed for Elixir/Phoenix

- Nova for embedded C code

- vim for scripts and quick edits of any of the above

VSCode for everything is like using a multitool to do woodworking in a garage. When you’re hiking or on a trip, a lightweight do it all tool has advantages. But I think it’s important to remember what IDE stands for.

ashikns

On a different perspective, I love that VS Code supports so many things. As full stack dev I have to work with Python/TypeScript/C# interchangeably, often in the same project. I can easily switch between projects with the same editor window, and I get to use the same keybinds.

someothherguyy

That is nice, but not much different from jetbrains IDEs that can do this as well?

The issue with the VSCode ecosystem is that extensions can conflict, die, etc, and that is very annoying when setting up environments takes a long time, IMO.

suby

I've been using CLion since 2017. I recently switched to Helix, and one of the refreshing things about this has been that I'm now in an editor that can seamlessly handle every language or text file type. I think switching between editors was slowing me down and causing friction.

With Jetbrains, while there are plugins for other languages, it's hit and miss in my experience. Managing multiple IDE's was simply annoying, even things such as ensuring your settings are synced across everything was an issue. A different editor per language feels like a decision made for business needs and not user needs.

Which isn't to say that their IDE's are bad or anything, they are good. But they would be a lot better if they didn't take their product and split it up for each mainstream language.

jghn

Not to mention, VSCode's story on debugging/profiling is an order of magnitude worse and clunkier than JetBrains'

wiseowise

Such as IntelliJ Ultimate that doesn’t have C++ integration, or CLion that can’t have Ruby integration or dozens of other combinations that happen in the field but not possible in IntelliJ.

Truly not that different from IntelliJ!

fkarlsson

I’m interested in hearing more about Nova for embedded C, what makes it more suitable? Looking for an excuse to try it.

pjmlp

I on the other hand rather go with use the best tool for the job, this applies to IDEs as well as programming languages.

The vertical integration from an Apple product tailored for a specific experience, versus the jigsaw from Linux desktop distributions.

8fingerlouie

I've pretty much replaced my Sublime Text usage with Zed as a general purpose editor, which handles any edits that last longer than i can be bothered to edit stuff in Vim. I've used Vi(m) for decades, and know my way around, and while it's a decent editor, it is NOT and IDE, and modern features feels like they're tacked on.

kubb

Aren't Zed and Nova and vim meant to be general-purpose editors too?

liampulles

How is Zed for refactoring Elixir stuff? I use VS code for it but I find the options for even just renaming variables quite poor.

cess11

I don't think any of the three LSP projects have good support for it. Usually I just do it from the terminal per file or directory.

Igniter is supposed to be able to but I haven't tried it: https://github.com/ash-project/igniter?tab=readme-ov-file#re...

systems

why zed for elixir/phoenix?

i thought the mainly maintained editor plugin was the one on vs code

matthew-craig

This is amazing news. The inability to write Kotlin in emacs was the only thing stopping me from using the language.

I really hope that this means that we can some day get a Jetbrains Java LSP. I would pay for an Intellij Ultimate subscription just to get access to such a thing.

systems

i love emacs, but nowadays i would argue most languages are far better supported outside emacs, with few exception like lisps

so being strictly emacs, will really limit your choices, and honestly waste your time

beepbooptheory

Perhaps its better to say there is very little "out of the box" wrt language support, but otherwise I am not quite sure what you mean for >90% of situations. Eglot + the right lsp server gets you really far these days.

matthew-craig

I currently rock a setup, as a Java dev, where I do as much as I can in emacs but have a binding to jump to the current line in Intellij. I find myself switching between the 2 without too much friction. It's mostly just committing in Intellij and having pre-commit checks analyze my changes.

-__---____-ZXyw

What do you love about emacs, if I may ask? Bit hard to guess what you could mean, given your subsequent claims there.

bunderbunder

Not original poster, but I will say that I specifically love Doom emacs.

It is really easy to navigate only from the keyboard. It uses vim-style keybindings for everything, so you don't have to do all the weird hand contortions that happen a more traditional emacs-style interface. When you do access functions, they are handled with multi-keystroke gestures while you're in command mode. The keystrokes are effectively navigating through a menu tree. There's a minibuffer at the bottom of the screen to help you navigate, so you don't have to rote memorize everything, but anything you do use often enough to memorize can be accessed in 2-4 keystrokes.

Some of the plugins are just amazing. Projectile - a project management and navigation sidebar - has really good ergonomics compared to what I'm used to with graphical IDEs. Magit is a fantastic and powerful git interface, and the only in-editor git interface I'll actually use; in any other IDE I'll just use git from the command line.

I've got to mention orgmode, of course. I'm not sure I can articulate why I like it so much; it's kind of like a vi-style editor interface where it's hard to grok without putting in some time, but those who do put in the time tend to fall in love.

I will agree that emacs's language support is spotty compared to vscode, but in this day and age that's true of any editor that isn't vscode. And it also lacks that really deep melding with the language that you get with IDEs that are all-in on one platform like IntelliJ IDEA and Visual Studio. But in general it's kind of an outlier in terms of popularity-to-polish ratio.

mr7uca

Super happy about an official lsp. But still mentions:

"Important note: currently, only JVM-only Kotlin Gradle projects are supported out-of-the box."

Like all the 3rd party lsps atm.

Hopefully they add kmp support soon (it's on their roadmap), still worthless for my workflow without kmp.

directstar2

I wonder what triggered the sudden change of mind.

They have been pretty firm on wanting keeping it closed for the purpose of giving an edge to the Jetbrain IDE's

wiseowise

Kotlin adoption has been stagnating recently (subjectively) and VSCode + forks have massive market share.

It was extremely shortsighted to think that a single language would sway people to IntelliJ instead of just limiting Kotlin’s growth.

clumsysmurf

Kotlin dominates Android development, but Android Studio is free. Google has become more and more hostile towards indie Play Store developers, so in 2025 it is more risky and less lucrative. Kotlin's "home turf" (Android) may be losing developers faster faster than Jetbrains can gain them on other platforms.

I assume its will be a polyglot world for some time to come, and devs that decide to retool into another stack could use anything else, leaving Kotlin behind.

sgammon

Android Studio is only "free" to the user.

mike_hearn

Hardly shortsighted. IntelliJ has a business model, Kotlin doesn't. Maximizing Kotlin usage does nothing for Jetbrains directly, just creates costs. And sure it brings people to IntelliJ, more importantly, it keeps them there.

It's kinda like describing Apple as short sighted for not giving away the source code to all their frameworks. Doing so would maximise usage but that's not their goal.

wiseowise

> Maximizing Kotlin usage does nothing for Jetbrains directly, just creates costs.

It brings mindshare and brand value. And it brings direct revenue in business contracts (I hope they get a hefty fee for supporting Google with Android Studio).

It is also investment in the future. How many student curriculums, courses, tutorials use IntelliJ over VSCode? And how many of them convert to IntelliJ later? IntelliJ is always seen as that heavy industrial combiner for professional workers compared to nimble and hype VSCode.

> And sure it brings people to IntelliJ, more importantly, it keeps them there.

I might be a vocal minority here, but it keeps nothing but resentment in me.

> It's kinda like describing Apple as short sighted for not giving away the source code to all their frameworks. Doing so would maximise usage but that's not their goal.

Apple is trillion dollar hardware company with completely locked down ecosystem with millions (billion?) of people using their products. They can do whatever the f*k they want and developers will dance to their tune.

The comparison you’re looking for is Borland. Delphi was once far more popular than Kotlin right now, and look how it ended up.

mohamez

One of the reasons might be that they realized that the absense of an official LSP for Kotlin will hinder its wide adoption by new developers who want to try Kotlin but don't want to move away from their favorite IDEs.

xolve

Most LLM based code-gen are VSCode forks. This reason would have certainly been on the list.

TheWiggles

Supposedly Kotlin usage has gone down a little bit in the last TIOBE Index. So I think they are trying to get Kotlin usage up.

https://www.tiobe.com/tiobe-index/

smokel

TIOBE is a famous benchmark, but it is also completely useless.

There is a lot of legacy code out there that skews the benchmark, making the index an unreliable indicator of a programming language’s current popularity or the volume of active development in that language.

You'd be hard-pressed to find a job where you can program Fortran or Assembly Language all day. It's a lot easier to find one where you can do Kotlin or Rust.

Kotlin might not be as popular as one would hope, but that is not something you should conclude from the TIOBE Index.

rhdunn

The TIOBE index is just reflecting search queries. If someone is familiar with a language, they would be searching about a specific framework, using LLMs/AI agents, and working on projects in that language. Those won't be reflected in the TIOBE index.

lolinder

Nit: TIOBE measures search results, not searches, specifically results for "Kotlin programming". But you're correct that it's a terrible metric for many reasons.

https://www.tiobe.com/tiobe-index/programminglanguages_defin...

rochak

I (and countless others I know) simply refuse to learn/use a language that locks you in an ecosystem. I haven’t taken Kotlin, C# or any of the Apple proprietary tech jobs and never will.

jeroenhd

Kotlin may have been relatively IDE-locked without a proper LSP being available, but C# is cross-platform in terms of both editors and runtimes (assuming you're not targeting Windows' .NET stack).

At this point I wouldn't consider it any more or less proprietary than any other Microsoft language, like TypeScript for instance.

exyi

Kotlin did not have open LSP, C# still does not have an open debugger.

The C# VSCode extension works in Microsoft's build of VSCode, not when someone else forks it and builds it themselves.

cess11

C# is partially cross-platform. Might be fine for web applications, but e.g. GUI frameworks aren't as cross in practice as they make it out to be, which I've wasted tens of hours figuring out before going back to Java and Racket.

The nice language on the CLR, F#, also doesn't seem to be very well liked by MICROS~1 anymore.

9cb14c1ec0

Every language has its ecosystem. I don't know why being locked into the Java or C# ecosystem is any worse than, say Python or Go. And I say that as someone who has used all of these languages.

iLemming

Moreover, every programming language has its own community. With conventions, rules, style guides, code of conduct, roadmaps and mentality. With some "weird" takes and with some "pragmatic insights", with their own "rock stars" and "graybeards" to respect and follow. Each with its own unique landscape of hills to choose to die on. "Nothing's wrong with XML", "Give me JSON or death", "Fuck that, YAML all the way for me", ".yaml is dead, long live .toml!", "pfff, you mortals have no idea but EDN is way better..." — and that's just some data-representation disagreements. Once you get to actually processing the data, it gets even worse: "object-orientation is bullcrap", "oh, no, this FP shit is so hard to read for me, what's wrong with good-old 'for' loops?", "if you're not using static types, you're a bad, bad person...", "yes, these 35 libraries to run our 3-liner script are really necessary", etc. Every single programming language has its own pain points and joyful bits. That's why programming is both an amazingly gratifying and a heinously crappy trade.

Do you want to age into an old, happy programmer? Avoid emotional attachment to any single programming language. Borrow good ideas from different sources, but don’t settle on a single PL, paradigm, or convention. Sure, you’ll probably end up hating each of them for different reasons, but you may find some that you don’t loathe so badly.

sorcercode

what job do you currently take?

rochak

I work on backend (distributed systems) leveraging languages like Java, Python, Go, Ruby and TypeScript.

andy800

With the proliferation of JS, TS, Python, Go, etc, Kotlin is probably not even a thought for many young developers. Any efforts by JetBrains to bring Kotlin to where the people are at (as opposed to expecting people to come to IntelliJ) is welcomed. Call me a stan, whatever, but Kotlin is the best, most productive language I've ever used, by far. Yes, it takes some effort to understand how to effectively utilize some of its features, but once you do, productivity (and enjoyment) elevates tremendously.

flykespice

It's great jetbrains finally taking some babysteps to support an official language server for VSCode after some great resilience from them.

I know it's a difficult spot because such effort will also indirectly compete with their main product which is an IDE, so I'm not very optimistic it'll last.

mohamez

>I know it's a difficult spot because such effort will also indirectly compete with their main product which is an IDE, so I'm not very optimistic it'll last.

I would say this if this step was taking early while Kotlin is still a new language in the market, but I think their late decision to develop an official LSP for Kotlin is because of reasons you just mentioned, but maybe they changed their minds because they saw other benifits including a wide adoption of Kotlin.

wiseowise

It also helped that whenever JB posted a Kotlin questionnaire there would be dozens of people asking “LSP?”.

lucasyvas

Does Fleet not use LSP?

yonatan8070

Considering how non-mature this LSP server is, probably not, Fleet probably uses whatever internal protocols JetBrains use inside their IDEs

someothherguyy

> Backend – a headless service that does the heavy lifting: indexing, static analysis, advanced search, navigation, and the like. Every such operation is initiated by a request from the workspace, which then processes the response and dispatches the data to the components that require it.

> As a backend, you can use a headless IntelliJ IDEA or a language server.

https://www.jetbrains.com/help/fleet/architecture-overview.h...

hocuspocus

Last time I checked it was only for Rust, specifically you couldn't use the LSP feature for arbitrary languages that aren't supported by Fleet yet.

Java and Kotlin are definitely not using the LSP but their proprietary backend.

pjmlp

Are they going to kill it in one year, as they did with the Eclipse plugin, after going big on Android?

jeroenhd

Based on the commit dates, it seems like their Eclipse plugin had at least four years of activity: https://github.com/Kotlin/kotlin-eclipse

I think the overlap between "people who use Eclipse" and "people interested in Kotlin" is pretty small, though. I've only seen Eclipse in use with companies and teams stuck working on legacy applications.

pjmlp

Not everyone worships InteliJ.

As for the one year, last release was on 2018, Kotlin was announced as main Android language in May 2017.

Now re-read my comment.

The three years predating it was JetBrains trying to find a way to sell Kotlin adoption, then they went big and closed shop.

Now they are stuck with Kotlin being seen as an Android language for the most part, and Fleet isn't taking off.

eitland

> Now they are stuck with Kotlin being seen as an Android language for the most part

Perhaps it’s different elsewhere, but here in Norway I’ve seen Kotlin used quite extensively in large backend codebases. It also comes up frequently in job postings—employers seem to actively ask for it when hiring.

specialist

Is Fleet Jetbrains' Servo?

I tried it for a few hours. I have no idea what I was supposed to notice.

Was the intent do be a new collaboration-first engine? Yes please.

sureglymop

This is good, glad they're realizing this is needed.

misja111

Why would anyone want to use VSC for Kotlin? After all the Kotlin creators are also the ones after JetBrains IntelliJ, it's hard to imagine some other IDE could suit Kotlin better?

pjmlp

They even created Kotlin to help sell InteliJ licenses, cleary they are having an adoption problem outside Android.

"The next thing is also fairly straightforward: we expect Kotlin to drive the sales of IntelliJ IDEA. We’re working on a new language, but we do not plan to replace the entire ecosystem of libraries that have been built for the JVM. So you’re likely to keep using Spring and Hibernate, or other similar frameworks, in your projects built with Kotlin. And while the development tools for Kotlin itself are going to be free and open-source, the support for the enterprise development frameworks and tools will remain part of IntelliJ IDEA Ultimate, the commercial version of the IDE. And of course the framework support will be fully integrated with Kotlin."

-- https://blog.jetbrains.com/kotlin/2011/08/why-jetbrains-need...

nsonha

Why is it that only you say this, everytime the same user handle, cherry-picking things out of context.

The part that you quote, is understood clearly that: for a company to do a thing (develop a programming language, for free), that thing need to tie back to their bottom line somehow.

That is not the same as "in order to sell more IDE licences, we need to create a programming language". That is such a roundabout way to think, why not just make more IDE variants for the uncovered languages, and not have to deal with promoting this entire new thing?

> an adoption problem outside Android

At this very moment I am working on a product with a kotlin back-end and flutter front-end.

eitland

In my case it is simple: I think IntelliJ is great but I much prefer VSCode and NetBeans.

Why? Two main reasons:

- On the projects I tend to work on, IntelliJ has a habit of breaking its internal configuration a few times a year—not just for me, but for my colleagues as well. When it does, it can take the better part of a day to sort out. Often I end up getting frustrated, deleting anything not under version control, reimporting the project, and end up having to reconfigure all the database connections and other bits manually.

- I also just prefer the more straightforward feel of NetBeans and VSCode. It’s a bit like my old car: less automation, fewer clever electronics. Sure, the new one is objectively better in many ways—but the old one was easier to get out of the snow, and it rarely surprised me.

specialist

> IntelliJ has a habit of breaking its internal configuration a few times a year

Same.

My impression is the project settings (all those XML configuration files under /.idea) are a gravity well that eventually implodes.

All project artifacts should be less Windows Registry and more like source code.

Which reminds me: I should be taking snapshots of known clean good settings. (Diffing those files, to cull unused stuff, is challenging.)

TiredOfLife

I have been trying to get NetBeans simply to work and not crash immediately for past 2 years

eitland

I haven’t had much chance to use NetBeans in recent years, as every role I’ve taken on has involved Kotlin to some extent. But back when I did use it, it felt like the Toyota Hilux of IDEs—sturdy, no-nonsense, and reliably got the job done. That was a big part of why I loved it.

Unfortunately, I’m a bit concerned it may have gone downhill since. It used to have dedicated full-time staff behind it, but now that it’s been handed over to the Apache Foundation, I suspect the budgets are tighter than they were under Oracle.

cosmic_cheese

It’s nice to have options. IntelliJ IDEs may be popular and well-regarded, but they’re not everybody’s cup of tea. As someone who’s spending a lot of time in Android Studio, it’s not unusual for me to become frustrated with it due to various behaviors and bits of UI design that can’t be changed, as well as fancy “smart” functionality that gets in the way almost as often as it helps.

I’m not terribly enthused with VS Code either but I’ll probably give this plugin a try, and since this has a standalone LSP it should be reasonable to write Kotlin plugins for other editors.

gavinray

I use VS Code for everything BUT Kotlin.

I begrudgingly use IDEA because it was the only option if you wanted a decent IDE experience. The fwcd VS Code LSP for Kotlin that existed somewhat works, but it's very barebones and hasn't seen much development.

Before there was VS Code, I used Atom, so I've been on the VSC train for about as long as you can get.

codesnik

It'd help with other editors as well. I'm vim user, for example, various "vim-modes" in other editors are unsatisfactory for me.

jerryslm

I like Kotlin. Please show some love to https://github.com/Kotlin/kotlin-eclipse as well. So that I can build my next app in it.

twen_ty

Apart from legacy projects written in Kotlin, after Java 21/23, what's the argument for using Kotlin anymore, especially that it's a proprietary language?

flanked-evergl

> especially that it's a proprietary language

In what sense is Kotlin a proprietary language? It's Apache 2.0 licensed AFAIK. And there are many projects that use Kotlin which are not legacy projects.

But to answer your question that is loaded to the brim with false assumptions/claims directly: https://kotlinlang.org/docs/comparison-to-java.html

Aaron2222

From https://kotlinlang.org/docs/faq.html#is-kotlin-free:

Yes. Kotlin is free, has been free and will remain free. It is developed under the Apache 2.0 license, and the source code is available on GitHub.

thuridas

- It has the best null handling mechanism

- Java handling of mutability of variables and collections

- Java is still more verbose and with less powerful utilities

- Much better for functional programming

-Some things were done right with all the learnt lessons. E.j. equals Vs ==

I respect preferring free languages. But I love Kotlin

Aaron2222

You'll be happy to hear that Kotlin is licensed under Apache 2 then.

From https://kotlinlang.org/docs/faq.html#is-kotlin-free:

Yes. Kotlin is free, has been free and will remain free. It is developed under the Apache 2.0 license, and the source code is available on GitHub.

adra

I love java and kotlin. The gap has certainly swayed way more in Java's favor over the last 5 years, but there are still a ton of great features that kotlin does first and if that gives java a target to run toward in a lagging way more legacy compatible rock solid way, isn't this just a win for both camps? Just consider kotlin (JVM) to be java-beta with slightly different flourishes, and you wouldn't be too far from the truth. Kotlin is also very big in pushing their other initiatives that aren't entirely directed at JVM at least for now, like cross compilation native targets, compile time serialization primitives, totally structured concurrency, etc

pjmlp

Having to target Android, Google's .NET, mostly.

cosmic_cheese

Yep. Not sure I’d use it elsewhere, but it’s the best option for Android dev at the moment.

rbehrends

Aside from the often cited nullability issue, here is an (incomplete) list of important things that Kotlin still does better than Java:

- First class, fully functional closures. - Non-abstract classes and methods are final by default. - Named parameters. - Easy to write iterators via sequence { ... } - First class support for unsigned types.

ab5tract

Also the ability to just put a function somewhere in the “bare” part of a namespace was something I didn’t realize I missed as much as I did.

mr7uca

Kotlin isn't just a jvm languague.

Larrikin

>after Java 21/23, what's the argument for using Kotlin

Having to use Java again when Kotlin exist

gavinray

Honestly, lack of the ability to write free-floating functions in Java.

Recent Java features like records, pattern matching, sum types via sealed interfaces have certainly made it a much more ergonomic and modern language.

But having to wrap everything in "class" feels ludicrous to me.

The other ones are lack of explicit null types (meant to be addressed by JEP "Null-Restricted and Nullable Types") and inability to write anonymous types for functions.

For example, something like:

   fun withCallback(
      handler: (A, B, C) -> D
   )
In Java, you have "Function3<A, B, C>" etc