Escape IntelliJ: Scala and Kotlin LSPs on Emacs Eglot

(jointhefreeworld.org)

91 points | by jjba23 2 days ago

16 comments

  • sajithdilshan 3 hours ago
    > But what do you actually get with IntelliJ? A massive, monolithic Java application that frequently hogs 8GB+ of RAM, locks up your system while “indexing pre-built binaries,” and forces you into a closed proprietary ecosystem.

    This is just exaggeration. I use IntelliJIDEA everyday (on mac) with multiple projects open and tbh they have optimized the IDE a lot to make it faster. I'm not saying it's perfect, but it's getting better. Also it's not closed source. The core of the IDE is open source (https://github.com/jetbrains/intellij-community) and for some specific framework support (e.g. Spring) are available on Ultimate.

    • mdawwg 4 minutes ago
      I'm also on a mac, but in the last few years performance and memory usage has gotten pretty bad. Though we use Intellij for mostly Angular / Node projects. A colleague of mine had reverted to an older major release because it runs better on our Macs. He ended up switching over to a popular open source IDE and hasn't looked back.
    • akshaydeshraj 1 hour ago
      IntelliJ (actually Android Studio based on IntelliJ) was my first real IDE and real programming experience. I was so blown away !

      Almost 15 years later, nothing else matches the out of the box experience of IntelliJ, atleast for JVM based languages.

      • pjmlp 2 minutes ago
        Add in VS for .NET languages and C++ (hot reload, debugging capabilities), and the beloved Delphi/C++ Builder duo as well.

        To this day there isn't anything like C++ Builder, if you want the famous VB dev experience, but with C++.

    • gf000 2 hours ago
      Also, like where else would the indices live? They are in memory to make going to definition, source, analysis etc fast. It's not even using java objects for these, so a feature-equivalent solution would be similarly "fat".
      • psychoslave 50 minutes ago
        I don’t know, using Vim and Exuberant Ctags can give you a significant part of these features for a very lower footprint. But to be clear, it’s not a ready-to-go path on parity with DX that IntelliJ provides.

        Hackers are often exceptionally good at optimizing the hidden parts no one give a shit until everything crumble under systemic slowness, but they often also are very bad at designing even a decent UX for everything else regarding in-your-face aspects.

        • f3408fh 8 minutes ago
          For the record Neovim has built-in LSP support and Vim supports LSP with plugins. Why use Ctags that you have to manually generate?
        • qsera 45 minutes ago
          >I don’t know, using Vim and Exuberant Ctags can give you a significant part of these features for a very lower footprint.

          100% true.

          Also, the problem I have with these magic thingies is that I don't know what to do if the magic stops working. With tools that just does one thing, I can easily figure out the point of failure and fix it.

    • rob74 57 minutes ago
      Completely agree. Also: some people enjoy fiddling with their tools, installing extensions and configuring everything until it's just perfect. Other people (most, I would argue - the proverbial "silent majority") want to get something that works reliably "out of the box" and has most (not all, IntelliJ IDEs also have plugins of course) batteries included. They shockingly are even willing to pay money for this!
    • CafeRacer 2 hours ago
      This is actually not an exaggeration. Ive been using WebStorm when it worked well, then it became progressively slower to the point of being unusable even on small projects.
      • tsvetkov 2 hours ago
        It's a bit strange to project a personal experience with one product onto all other products by the same vendor, even if those products use shared platform parts. Not to dismiss your claim, it's just IDEs (code engines specifically) are naturally pretty complicated pieces of software, so the experience may vary.

        The claim that 8Gb RAM is required just for Intellij seems to be at least overgeneralization (also depends a bit on how you count RAM usage; e.g. do you count all mmaped files as RAM usage even when pages are not loaded?). Can be true for some projects, but I've been working on decently sized Java/Kotlin codebases (~250k locs) with way less RAM allocated for Intellij (again, your experience may vary). Even Intellij and Kotlin projects themselves have been usable with less memory, at least some time ago.

        What's more baffling, though, is how an LSP would be significantly better if it is based on the same IDE core, just running headlessly? I think there may be an independent non-IDE based LSP for Scala, but both Java and Kotlin LSP are based on existing IDEs engines (Java LSP is based on Eclipse engine, Kotlin LSP is based on Intellij).

        A quote from the kotlin-lsp GitHub repository: > The language server is based on the most recent IntelliJ IDEA version and proprietary parts of JetBrains Air and Fleet products, making it partially closed-source.

        https://github.com/Kotlin/kotlin-lsp

      • Bishonen88 2 hours ago
        Counterpoint: use intellij on full stack apps with cdk, react, sqls and whatnot, multiple open at a time, without any problem.
        • affenape 2 hours ago
          I've tried using RustRover over WSL2 multiple times with every new release, but it's been a huge disappointment every time. My fans constantly spin like crazy, memory vanishes into thin air, and typing is super laggy - it even overwrites random sections of the file sometimes. On top of that, the built-in terminal is totally unusable because it craps out and freezes the app whenever there's a large output.

          PyCharm, on the other hand, was always great to use. But since VS Code gives me pretty much everything I need for my daily work without demanding too much from my system, I've finally moved away from JetBrains.

      • sgt 2 hours ago
        I've got Android Studio open now, while also working in several PyCharm projects, IntelliJ and WebStorm. No issues at all on macOS.
      • Cthulhu_ 2 hours ago
        I feel the same about VS Code, it's probably some of the plugins but sometimes, especially when LLMs make edits, memory usage explodes until my system breaks down and force pauses some apps until I kill some of them.

        I should go back to Zed, maybe use the CLI interface for agentic programming instead of the UI.

    • pjmlp 1 hour ago
      Quite ironic, given that Emacs used to stand for "Eight Megabytes and Constantly Swapping" for the epoch hardware.
      • neutronicus 1 hour ago
        Also ironic given that emacs with a LSP server is more than capable of slowing a dev machine to a crawl
    • tiew9Vii 1 hour ago
      I've used InteliJ on and off for 20 plus years. It's progressively got bloated and slower, not faster.

      20 years ago it was the fast lean option when there was Netbeans and Eclipse. Today it's ok, still good feature wise but fast and lean it is not anymore when I've used it for Scala oand Kotlin.

      • gib444 1 hour ago
        Yup. It's been particularly bad since around 2023/2024 and only got worse with all the AI crap, though I think that's been almost a useful scapegoat for them recently
        • wiether 1 hour ago
          I've tried (all?) the AI stuff they published, it was awful; but I was able to easily uninstall/deactivate those features once I realized it was not helpful.

          On my MBP M4 or my Linux laptop, I never get the impression that it's bloat.

          Prior to using IntelliJ I had been a Eclipse user and I've never experienced even 5% of the pain I had with Eclipse since moving to IntelliJ.

          When everything is going to shite, I welcome with pleasure my yearly invoice from JetBrains, thinking that, at least, there is a company pushing quality software that deserves my money.

    • z3t4 1 hour ago
      People will complain about 2MB ram usage and then gladly spend 4k on a mac pc
      • WalterGR 7 minutes ago
        The trick is to not take the bait that those people dangle.
  • minraws 5 minutes ago
    I wrote an LSP for kotlin and java recently and it's so annoying how tightly coupled all the LSP stuff is in IntelliJ to the IDE itself they have a outside LSP project which seems to be going very slow or nowhere is very sad.

    Note I tried to use IntelliJ to build it the performance was not nearly as nice as I would have liked still better than a lot of LSPs but still.

    I know a bunch of folks have tried it but I think only Jetbrains can build a good one, unless someone actually goes all in on solving this for a few months and rebuilds the parsing and types systems outside of the Jetbrains toolchain and ecosystem.

    Java is likely easier but it's also quite jank in terms of how existing solutions work.

    But I like projects like this, I am not against IntelliJ it must be great had been great when I was learning but I want a lsp to use for scripts and the small edits, opening a massive IDE is very overkill for the kinds of small changes I like to make now.

  • laszlojamf 58 minutes ago
    I agree that IntelliJ is a monster of a resource hog, but I have yet to find an editor where code navigation is as good. That's basically all I use it for these days, in the days of LLMs, and I still think it's worth it. VSCode, especially for golang, is terrible. I might be holding it wrong, but I've really tried, and it's just not good enough.

    Before LLMs, when I still refactored by hand, coworkers who were using vim or vscode used to ask me to do big refactors, because IntelliJ always got it right, whereas with the other editors it was hit-or-miss.

    • f3408fh 1 minute ago
      Saying that VS Code is terrible for Go is simply false. The Go extension is regularly updated and works extremely well. Sure, it lacks some advanced refactoring features available in IntelliJ, such as reordering function parameters, but that does not make it a poor choice for Go dev.
    • terminalbraid 53 minutes ago
      This is my experience and it really sucks that Jetbrains has devolved into such a poorly run company. It's clear a lot of their real talent who cared about the programming side and refactoring left years ago. Now it seems like all their product decisions are from bog standard non-technical business people who chase buzzwords.

      This is a major problem for them because they fragmented their IDE codebase so much properly maintaining it requires resources and people they don't have and would have to invest years of effort to replace. But that doesn't maximize quarterly profit, so it's left to decay and we get hourly LLM plugin updates.

  • mastermage 7 minutes ago
    I enjoy JetBrains IDEs alot. Altough I mainly use Dataspell and Datagrip and not Intellij but they make my life easier. Specifically when connecting to new DBs
  • marginalia_nu 3 hours ago
    The fact we still don't have a decent Java language server is one of my canaries for the fact that LLMs still, generally speaking, can't ship. There is undeniably demand for this sort of thing, but nobody is coming to meet it. (jdtls, bless it for trying, is just not good)
    • adamddev1 2 hours ago
      Exactly. I've been trying to say this. Some people think that because people can write CRUD APIs and end-user apps with AI, no-one will need to write code anymore.

      There is so much to be built in terms of tooling and libraries where we need tight, solid, well-crafted, original, unique code.

      • marginalia_nu 1 hour ago
        They have a real weakness when it comes to designing something that doesn't have a design precedent. There are no good java language servers, so it can't design a good java language server.

        You can also show this with by e.g. asking an LLM to design an internet search engine in Java, for which there doesn't exist very many examples, and my own Marginalia Search and my devlog is one of few design examples it has to reach for.

        Even mentioning nothing of MS just using similar constraints, you'll get a nearly identical design to Marginalia Search. Algorithm choices will be the same. Document and term IDs will encoded in a similar succinct fashion (in one of my experiments, the chosen design was binary compatible). Architecture will be the same. Services and components will to a significant degree have the same names and even using the same non-standard vocabulary. It isn't word for word identical, there sure are a lot of coincidental similarities that notably don't exist with search engines implemented in other languages.

    • dtech 2 hours ago
      Nah, there is little demand for it that's the reason.

      LLMs don't need a LSP, they work better without it often. Most Java devs use IntelliJ or another IDE with its inbuilt thing. For everyone else the existing one is good enough for incidental usage.

      So ~no one cares

      • marginalia_nu 2 hours ago
        I care, which is existence proof that someone cares.
        • dtech 7 minutes ago
          ~no one == approximately no one
          • marginalia_nu 5 minutes ago
            There are multiple questionable attempts at solving this problem in this comment thread. Where did they come from? We're also commenting on a blog post that is discussing an adjacent problem to this. ... which you decided to comment on?
    • jlgarhdez 2 hours ago
      I am actively working on a fast language server for Java and kotlin.

      I’m driving it daily and it’s much faster than IJ for what I need, although it doesn’t provide all the diagnostics that IJ does…

      It’s on github.com/pepegar/ktlsp if you’re curious.

      • jlgarhdez 2 hours ago
        To be clear, it’s not supported by a compiler, but rather plain tree sitter syntax parsing. I’m embarking on a bigger project to create a linter (and integrate) without relying on JVM or a compiler at all, but IDK when that’s gonna come.
    • timanderson 2 hours ago
      How is the Oracle one? It has better reviews in VS Code marketplace than the Red Hat one (jdtls)
    • whazor 2 hours ago
      why do you need a java language server? Let them use the same tooling you would use in CI
      • Cthulhu_ 2 hours ago
        These are two different things; a language server would be a standardized intermediate layer between said CI tooling and any editor for inline / realtime checking, code suggestions and formatting.
    • TiredOfLife 3 hours ago
      The one in VS Code seems fine. It's not quite intellij level, but what is.

      And speaking on llm and lsp. The new PHP lsp PHPantom (with help of llms) is approaching jetbrains offering fast.

      • marginalia_nu 3 hours ago
        That's just a wrapper for jdtls. I mean it works on some projects, but fails on many gradle builds and is basically just running the Eclipse IDE headlessly.

        This is probably the one contender:

        https://github.com/georgewfraser/java-language-server

        and it kinda works, but it's also a bit lacking.

        • spockz 2 hours ago
          Metal, the Scala LSP, seems to do Java just fine. When using it in VSC, I feel the limitations compared to IntelliJ are more coming from VSC than from the LSP. Dependencies etc just resolve fine, it is just the UI that is not as polished as IntelliJ’s.

          I try VSC with Metal twice a year. It works fine for small projects. But for bigger projects it lacks the more holistic approach that IntelliJ has and feels more like a text editor with smarts bolted on than an IDE.

          I’m using Zed a lot as well for Golang and a bit for Rust. For Java it is also hard to use and lacking the same polish.

        • pjmlp 1 hour ago
          The problem is using Gradle, for starters.
        • Squarex 3 hours ago
          oracle has some lsp based on netbeans, but it's not great either
  • DrProtic 1 hour ago
    People will go to great lengths to avoid paying for what is, arguably, an outstanding product from a great company, then think nothing of spending the same amount at Starbucks.

    I don’t think I’ve ever seen a company scrutinized and nitpicked as much as JetBrains.

    • phplovesong 53 minutes ago
      Well its a russian company, and took part in the solarwinds hack, that was directly funded by the fsb. So, yeah, it should ve scrutinized, nitpicked and avoided at all costs.

      Its 2026, there is no need for a proprieraty IDE that is stuck in the early 2000s.

      • denisw 28 minutes ago
        JetBrains is and has always been a Czech (and, thus, EU) company, not a Russian one. Yes, the founders are Russian, but that does not make the company so. They did have Russian offices, but closed them after the start of the Ukraine war [1].

        The only confirmed link to the SolarWinds attack seems to be that SolarWinds was using TeamCity (JetBrains' CI/CD product) and that this was alledgedly used as a "gateway" to SolarWinds' systems - which doesn't require any cooperation from JetBrains, just an unpatched security issue. In fact, a patch by JetBrains for the exploited issue seems to have been available, but was not installed [2].

        So while any company deserves scrutiny, these particular allegations against JetBrains smell like FUD to me.

        See also JetBrains' own statements on the SolarWinds thing: https://blog.jetbrains.com/blog/2021/01/06/statement-on-the-...

        [1]: https://en.wikipedia.org/wiki/JetBrains

        [2]: https://www.cisa.gov/news-events/cybersecurity-advisories/aa...

      • marand23 33 minutes ago
        They closed all their russian office locations at the start of the Ukraine war afaik so I wouldn't call it russian any more.
      • cdmckay 3 minutes ago
        Source: trust me bro
  • tecleandor 2 hours ago
    I'm trying to avoid IntelliJ because I only need it for editing TeamCity build configuration files, that are written in a Kotlin based DSL [0], and autocomplete and linting are be very helpful.

    I've tried Eclipse and VS Code but I don't get them to autocomplete or detect syntax correctly. Would any LSP help me with that? As I have no idea about Java, Kotlin or Gradle, everything is kinda confusing to me...

    --

      0: https://www.jetbrains.com/help/teamcity/kotlin-dsl.html
  • vanyaland 14 minutes ago
    worth noting the kotlin-lsp here is jetbrains own, basically intellij analysis engine running headless. you're just dropping the intellij gui
  • jbvlkt 1 hour ago
    Sometimes I also feel that Idea is too slow, especially for smaller projects or languages where I do not need top tier support. ie. I am backend rust and python programmer. I also have to work with JS/TS and C++ projects but I mostly only read through them.

    I started using neovim with plugins if syntax highlighting and good navigation is enough. I have also set up ideavim configuration to be as close to neovim as possible. Now I can easily switch between Idea and neovim with almost the same workflow.

  • phmx 3 hours ago
    The Metals documentation includes instructions for setting it up with Emacs. I followed them, and everything works, including worksheets.

    https://scalameta.org/metals/docs/editors/emacs

  • rs_rs_rs_rs_rs 1 hour ago
    IntelliJ Git integration is so good I wish it would be a standalone client.
    • 0x1ceb00da 1 hour ago
      You can do "idea diff file1 file1" to open a popup with their diff tool.
    • wiether 1 hour ago
      Funnily that's the one feature I dislike in IntelliJ and thus relies on another GUI

      Otherwise I like having everything in one place: code, containers, databases, remotes...

  • TiredOfLife 3 hours ago
    > and forces you into a closed proprietary ecosystem

    https://github.com/jetbrains/intellij-community ?

    • jillesvangurp 2 hours ago
      Exactly, I've been using their community edition for years for Kotlin development. Works fine for normal day to day development needs. I had a paid subscription for a while that I just let expire because I rely more on agentic coding tools these days and I just don't write a lot of code by hand at this point. The paid version adds a lot of deeper integrations and tools that you may or may not need. Personally, I don't really miss most of that. These days the community edition and the paid edition are the same. But if you don't take a subscription, the paid stuff is unavailable.

      As a company, Jetbrains is a private company. It's one of the few large software companies that managed to get there without selling out to VCs or the vultures on the stock market. Of course they want to make a profit but they also create a lot of value for developers. Including a lot of open source things. I think it's nice that it's still possible to create a business by bootstrapping and without compromising your values.

      • pjmlp 1 hour ago
        I keep finding interesting that some devs refuse to pay for tooling like every other profession, yet they don't take pull requests as salary either.
        • psychoslave 33 minutes ago
          In most profession, you don’t have a continuous flow of new tools to evaluate if they worth integrating in your workflow, which is already heavily time costly, and tools rarely break overnight due to some remote ecosystemic reason or cease to work due to license expiration/change/whatever.

          How enthusiast are most professional to throw money at "smart" tools, hmm?

          • pjmlp 9 minutes ago
            Here is an hint from someone walking the planet since the 1970's, you also don't need to follow every fashion in IT.
        • skydhash 56 minutes ago
          I would pay for tooling, but most of them is now pure grift. Even Jetbrains has gone the anticonsumer route with their focus on AI (plugins enabled by default).
          • pjmlp 7 minutes ago
            The money has to come from somewhere, otherwise it is yet another doom and gloom of a FOSS project being acquired by a big corp, or the author moving on into proprietary software, donations hardly put food on the table outside rockstar level projects.
  • anthk 1 hour ago
    Can Java developers run a GUI builder outside the IDE and then use any other editor for the rest and then compile a project with Maven and the like?
  • phplovesong 55 minutes ago
    Same for the jetbrains PHP based IDE (iirc named something in the likes of webstorm, or phpwind etc) is super slow and hogs ram like crazy. Also most devs using it have really, relly poor skills. Its weird i know, but i see it time and time again.
  • ares623 3 hours ago
    oh I thought this was somehow extracting the proprietary LSP engine that IntelliJ has and using it with Emacs.
    • andylynch 3 hours ago
      I think Jetbrains did that already; the Kotlin LSP server is derived from the (also open source) IntelliJ plugin
  • sawrtagy 3 hours ago
    [dead]