java: switch to jdtls instead

This commit is contained in:
kossLAN 2024-08-30 00:09:10 -04:00
parent e1061ee305
commit 244000e030
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
2 changed files with 4 additions and 4 deletions

View file

@ -99,7 +99,7 @@ with final.pkgs.lib; let
# language servers, etc.
lua-language-server
clang-tools # provides clangd which is a c/c++ lsp
java-language-server
jdt-language-server # java ls
nil # nix LSP
# autoformatters

View file

@ -1,5 +1,5 @@
-- Exit if the language server isn't available
if vim.fn.executable('java-language-server') ~= 1 then
if vim.fn.executable('jdtls') ~= 1 then
return
end
@ -9,8 +9,8 @@ local root_files = {
}
vim.lsp.start {
name = 'java_language_server',
cmd = { 'java-language-server' },
name = 'jdtls',
cmd = { 'jdtls' },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
capabilities = require('user.lsp').make_client_capabilities(),
}