How to use nvim-jdtls for Java and nvim-lspconfig for everything else?

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • eclipse.jdt.ls

    Java language server

    I installed eclipse jdtls which worked for Java, but I was not able to go to definitions for methods/classes outside of my project (ie, libraries and such, something like in IntelliJ where you can go to the definition or implementation for the library code), so I thought it may be a limitation of nvim-lspconfig

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • nvim-jdtls

    Extensions for the built-in LSP support in Neovim for eclipse.jdt.ls

    I found nvim-jdtls which seems to provide more features for Java and hopefully fix my issue. However, I see that in the README that you should not run both nvim-lspconfig and nvim-jdtls together. I see the recommendation online to put the nvim-jdtls configuration in ~/.config/nvim/ftplugin/java.lua so that it will only run on java files, but if I have nvim-lspconfig automatically running from ~/.config/nvim/after/plugin/lsp.lua file, how can I make it so that nvim-lspconfig doesn't run if it's a Java?

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Detect when a language server is usable?

    5 projects | /r/neovim | 31 Jul 2022
  • I was sad the moment I realized I had to use Intellij IDEA instead of NeoVim for serious Java/Kotlin development. This was my best attempt to make my self *feel at home*!

    3 projects | /r/neovim | 1 May 2021
  • Having the worst time trying to use JDTLS

    1 project | /r/neovim | 11 Dec 2023
  • 2.5 Million Java Developers on Visual Studio Code. Microsoft and Red Hat shares Joint Roadmap for Next 6 Months Together

    1 project | /r/java | 11 Dec 2023
  • Client 2 quit with exit code 1 and signal 0 when opening a .java files

    2 projects | /r/neovim | 10 Nov 2023

Did you konow that Java is
the 8th most popular programming language
based on number of metions?