Skip to content

Commit

Permalink
update jdtls config
Browse files Browse the repository at this point in the history
  • Loading branch information
contrun committed Oct 12, 2024
1 parent 71e031e commit 9c6ca80
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dot_config/nvim/ftplugin/java.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
local config = {
root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]),
}
require('jdtls').start_or_attach(config)
1 change: 1 addition & 0 deletions dot_config/nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ return require('packer').startup({
-- LSP server
use {
'neovim/nvim-lspconfig',
requires = { "mfussenegger/nvim-jdtls" },
config = function() require('plugins.lspconfig') end
}

Expand Down
2 changes: 1 addition & 1 deletion dot_config/nvim/lua/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local get_servers_to_install = function()
local servers_to_install = {
"clangd", "pyright", "jsonls", "dockerls", "rust_analyzer", "elixirls",
"jdtls", "zls", "gopls", "texlab", "rnix"
"zls", "gopls", "texlab", "rnix"
}
return servers_to_install
end
Expand Down

0 comments on commit 9c6ca80

Please sign in to comment.