Skip to content

Commit dcc93bc

Browse files
author
YI
committed
update jdtls config
1 parent 9f568b6 commit dcc93bc

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎dot_config/nvim/ftplugin/java.lua‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
local config = {
2+
root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]),
3+
}
4+
require('jdtls').start_or_attach(config)

‎dot_config/nvim/lua/plugins.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ return require('packer').startup({
128128
-- LSP server
129129
use {
130130
'neovim/nvim-lspconfig',
131+
requires = { "mfussenegger/nvim-jdtls" },
131132
config = function() require('plugins.lspconfig') end
132133
}
133134

‎dot_config/nvim/lua/plugins/lspconfig.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
local get_servers_to_install = function()
22
local servers_to_install = {
33
"clangd", "pyright", "jsonls", "dockerls", "rust_analyzer", "elixirls",
4-
"jdtls", "zls", "gopls", "texlab", "rnix"
4+
"zls", "gopls", "texlab", "rnix"
55
}
66
return servers_to_install
77
end

0 commit comments

Comments
 (0)