mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-28 14:07:46 +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
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- 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
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
on_attach=on_attach,
|
on_attach=on_attach,
|
||||||
@ -143,6 +143,17 @@ for _, lsp in ipairs(servers) do
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require'lspconfig'.jdtls.setup{
|
||||||
|
on_attach=on_attach,
|
||||||
|
flags = {
|
||||||
|
debounce_text_changes = 150
|
||||||
|
},
|
||||||
|
cmd = { 'jdtls' }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
autocmd BufEnter * lua require'completion'.on_attach()
|
autocmd BufEnter * lua require'completion'.on_attach()
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ case "$file" in
|
|||||||
*\.m) octave -qW "$file" ;;
|
*\.m) octave -qW "$file" ;;
|
||||||
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
||||||
*config.h) sudo make install ;;
|
*config.h) sudo make install ;;
|
||||||
|
*\.java) java "$file" ;;
|
||||||
*\.js) node "$file" ;;
|
*\.js) node "$file" ;;
|
||||||
*\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;;
|
*\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;;
|
||||||
*\.nim) nim c -r -d:noColors "$file" ;;
|
*\.nim) nim c -r -d:noColors "$file" ;;
|
||||||
|
1
.profile
1
.profile
@ -41,6 +41,7 @@ export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
|
|||||||
# java
|
# java
|
||||||
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk"
|
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk"
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
export JDTLS_HOME="/usr/share/java/jdtls"
|
||||||
|
|
||||||
# golang
|
# golang
|
||||||
export GOPATH="${HOME}/code/go"
|
export GOPATH="${HOME}/code/go"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user