Fixed extra spawning of jdtls instance, plus use relative home dir.

This commit is contained in:
anth64
2023-12-27 19:19:30 -05:00
parent 708b7da313
commit 2da43ba493
2 changed files with 2 additions and 3 deletions
-1
View File
@@ -6,7 +6,6 @@ lsp.setup_servers({
'eslint', 'eslint',
'rust_analyzer', 'rust_analyzer',
'clangd', 'clangd',
'jdtls',
'lua_ls' 'lua_ls'
}) })
+2 -2
View File
@@ -1,5 +1,5 @@
local config = { local config = {
cmd = {'/home/anth/.local/share/jdtls/bin/jdtls'}, cmd = { vim.fn.expand("~/.local/share/jdtls/bin/jdtls") },
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]), root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
} }
require('jdtls').start_or_attach(config) require('jdtls').start_or_attach(config)