feat: added java support I think
This commit is contained in:
parent
27d1234f6b
commit
7a0e05991d
4 changed files with 32 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ local servers = {
|
|||
clangd = {},
|
||||
ts_ls = {},
|
||||
dartls = {},
|
||||
jdtls = {},
|
||||
}
|
||||
|
||||
for name, opts in pairs(servers) do
|
||||
|
|
|
|||
19
lua/custom/plugins/java.lua
Normal file
19
lua/custom/plugins/java.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
"simaxme/java.nvim",
|
||||
config = function()
|
||||
require("java").setup {
|
||||
rename = {
|
||||
enable = true, -- enable the functionality for renaming java files
|
||||
nvimtree = true, -- enable nvimtree integration
|
||||
write_and_close = false, -- automatically write and close modified (previously unopened) files after refactoring a java file
|
||||
},
|
||||
snippets = {
|
||||
enable = true, -- enable the functionality for java snippets
|
||||
},
|
||||
root_markers = { -- markers for detecting the package path (the package path should start *after* the marker)
|
||||
"main/java/",
|
||||
"test/java/",
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
10
lua/custom/plugins/jdtls.lua
Normal file
10
lua/custom/plugins/jdtls.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
"mfussenegger/nvim-jdtls",
|
||||
config = function()
|
||||
local config = {
|
||||
cmd = { "/usr/bin/jdtls" },
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ "gradlew", ".git", "mvnw" }, { upward = true })[1]),
|
||||
}
|
||||
require("jdtls").start_or_attach(config)
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue