Update init.lua
This commit is contained in:
parent
967641f214
commit
31e6909cf1
1 changed files with 44 additions and 21 deletions
|
@ -26,6 +26,8 @@ plug('tree-sitter/tree-sitter')
|
|||
plug('tpope/vim-surround')
|
||||
plug('neovim/nvim-lsp')
|
||||
plug('neovim/nvim-lspconfig')
|
||||
plug('williamboman/nvim-lsp-installer')
|
||||
plug('mfussenegger/nvim-jdtls')
|
||||
plug('junegunn/goyo.vim', {['for'] = 'markdown'})
|
||||
plug('junegunn/fzf', {['dir'] = '~/.fzf', ['do'] = './install --all'})
|
||||
plug('junegunn/fzf.vim')
|
||||
|
@ -133,6 +135,27 @@ for _, lsp in pairs(servers) do
|
|||
}
|
||||
}
|
||||
end
|
||||
-- Java auto complete/LSP
|
||||
local jdtls_cfg = {
|
||||
cmd = {
|
||||
'java',
|
||||
'-Declipse.application=org.eclipse.jdt.ls.core.id1',
|
||||
'-Dosgi.bundles.defaultStartLevel=4',
|
||||
'-Declipse.product=org.eclipse.jdt.ls.core.product',
|
||||
'-Dlog.protocol=true',
|
||||
'-Dlog.level=ALL',
|
||||
'-Xms1g',
|
||||
'--add-modules=ALL-SYSTEM',
|
||||
'--add-opens', 'java.base/java.util=ALL-UNNAMED',
|
||||
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
|
||||
'-jar', '~/.local/share/nvim/lsp_servers/jdtls/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.2.400.v20211117-0650.jar',
|
||||
'-configuration', '~/.local/share/nvim/lsp_servers/jdtls/config_mac'
|
||||
},
|
||||
root_dir = require('jdtls.setup').find_root({'.git', 'mvnw', 'gradlew'})
|
||||
}
|
||||
if vim.bo.filetype == 'java' then
|
||||
require('jdtls').start_or_attach(jdtls_cfg)
|
||||
end
|
||||
-- 2 Tab space standard languages
|
||||
-- Clojure and Common Lisp style is 2 space indent
|
||||
vim.cmd([[
|
||||
|
|
Loading…
Reference in a new issue