feat: added java support I think
This commit is contained in:
parent
27d1234f6b
commit
7a0e05991d
4 changed files with 32 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"java.nvim": { "branch": "main", "commit": "be6b5775dc2f757ce605459f5bc33167aedcdfbc" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
|
||||
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "4d77ff02063cf88963d5cf10683ab1fd15d072de" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "b0caeef0d835fbe19df6ad71dbc4345eaaea649c" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "f0e9951778802526b14c934f7bf746e1e0ae5ed0" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
|
|
|
|||
|
|
@ -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