Update init.lua

This commit is contained in:
Rawley Fowler 2022-05-27 14:52:29 -06:00 committed by GitHub
parent 967641f214
commit 31e6909cf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,8 @@ plug('tree-sitter/tree-sitter')
plug('tpope/vim-surround') plug('tpope/vim-surround')
plug('neovim/nvim-lsp') plug('neovim/nvim-lsp')
plug('neovim/nvim-lspconfig') plug('neovim/nvim-lspconfig')
plug('williamboman/nvim-lsp-installer')
plug('mfussenegger/nvim-jdtls')
plug('junegunn/goyo.vim', {['for'] = 'markdown'}) plug('junegunn/goyo.vim', {['for'] = 'markdown'})
plug('junegunn/fzf', {['dir'] = '~/.fzf', ['do'] = './install --all'}) plug('junegunn/fzf', {['dir'] = '~/.fzf', ['do'] = './install --all'})
plug('junegunn/fzf.vim') plug('junegunn/fzf.vim')
@ -133,6 +135,27 @@ for _, lsp in pairs(servers) do
} }
} }
end 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 -- 2 Tab space standard languages
-- Clojure and Common Lisp style is 2 space indent -- Clojure and Common Lisp style is 2 space indent
vim.cmd([[ vim.cmd([[