mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-25 20:47:45 +01:00
nvim: setup for java development
This commit is contained in:
parent
91f0c4aaf8
commit
745d1a6321
@ -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()
|
||||
|
||||
|
@ -31,6 +31,7 @@ case "$file" in
|
||||
*\.m) octave -qW "$file" ;;
|
||||
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
||||
*config.h) sudo make install ;;
|
||||
*\.java) java "$file" ;;
|
||||
*\.js) node "$file" ;;
|
||||
*\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;;
|
||||
*\.nim) nim c -r -d:noColors "$file" ;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user