neovim: Add java language server

This commit is contained in:
Simon Bruder 2023-04-07 23:28:31 +02:00
parent afc328b5ed
commit 8e70f1c790
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 6 additions and 0 deletions

View file

@ -47,6 +47,7 @@ in
] ++ (lib.optionals nixosConfig.sbruder.full [ ] ++ (lib.optionals nixosConfig.sbruder.full [
gopls gopls
haskell-language-server haskell-language-server
jdt-language-server
rnix-lsp rnix-lsp
rust-analyzer rust-analyzer
(python3.withPackages (ps: with ps; [ (python3.withPackages (ps: with ps; [

View file

@ -84,6 +84,7 @@ setup_filetype('dockerfile', 4)
setup_filetype('gitcommit', nil, 'colorcolumn=72') setup_filetype('gitcommit', nil, 'colorcolumn=72')
setup_filetype('go', 4, 'noexpandtab') setup_filetype('go', 4, 'noexpandtab')
setup_filetype('haskell', 4) setup_filetype('haskell', 4)
setup_filetype('java', 4)
setup_filetype('lua', 4) setup_filetype('lua', 4)
setup_filetype('python', 4) setup_filetype('python', 4)
setup_filetype('sh', 4, 'noexpandtab') setup_filetype('sh', 4, 'noexpandtab')
@ -285,6 +286,10 @@ lsp.hls.setup {
on_attach = on_attach, on_attach = on_attach,
root_dir = lsp.util.root_pattern('*.cabal', 'stack.yaml', 'cabal.project', 'package.yaml', 'hie.yaml', '.git'), root_dir = lsp.util.root_pattern('*.cabal', 'stack.yaml', 'cabal.project', 'package.yaml', 'hie.yaml', '.git'),
} }
lsp.jdtls.setup {
on_attach = on_attach,
cmd = {'jdt-language-server', '-configuration', '/home/simon/.cache/jdtls/config', '-data', '/home/simon/.cache/jdtls/workspace'}, -- copied from upstream, but changed executable name
}
lsp.pylsp.setup { lsp.pylsp.setup {
on_attach = on_attach, on_attach = on_attach,
} }