1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-10 03:21:16 +02:00

nvim: setup for java development

This commit is contained in:
2021-09-17 04:35:24 +02:00
parent 91f0c4aaf8
commit 745d1a6321
3 changed files with 14 additions and 1 deletions

View File

@@ -134,7 +134,7 @@ end
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local servers = { "pyright", "java_language_server", "bashls", "tsserver", "texlab", "ccls", "gopls", "hls", "nimls" }
local servers = { "pyright", "bashls", "tsserver", "texlab", "ccls", "gopls", "hls", "nimls" }
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
on_attach=on_attach,
@@ -143,6 +143,17 @@ for _, lsp in ipairs(servers) do
}
}
end
require'lspconfig'.jdtls.setup{
on_attach=on_attach,
flags = {
debounce_text_changes = 150
},
cmd = { 'jdtls' }
}
EOF
autocmd BufEnter * lua require'completion'.on_attach()