refactor(nvim): improve nvim-java
setup
Some checks failed
Check Formatting of Files / Check-Formatting (push) Failing after 1m5s
Some checks failed
Check Formatting of Files / Check-Formatting (push) Failing after 1m5s
This commit is contained in:
parent
878642d009
commit
6f16a07a4e
@ -152,9 +152,6 @@ return {
|
|||||||
"Decodetalkers/csharpls-extended-lsp.nvim",
|
"Decodetalkers/csharpls-extended-lsp.nvim",
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
dependencies = {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
},
|
|
||||||
opts = {
|
opts = {
|
||||||
|
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
@ -292,20 +289,36 @@ return {
|
|||||||
},
|
},
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
require("java").setup()
|
require("mason-lspconfig").setup({
|
||||||
|
automatic_installation = true,
|
||||||
|
ensure_installed = {
|
||||||
|
"tsserver",
|
||||||
|
},
|
||||||
|
handlers = {
|
||||||
|
["jdtls"] = function()
|
||||||
|
require("java").setup({
|
||||||
|
notifications = {
|
||||||
|
dap = false,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
lspconfig.jdtls.setup({
|
lspconfig.jdtls.setup({
|
||||||
capabilities = lsp_capabilities,
|
capabilities = lsp_capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
init_options = {
|
-- HACK: Have to define this to make jdtls show hovers, etc.
|
||||||
extendedClientCapabilities = {
|
init_options = {},
|
||||||
-- Have to disable this to make jdtls actually show hovers lol
|
|
||||||
clientHoverProvider = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
settings = {
|
settings = {
|
||||||
java = {
|
java = {
|
||||||
|
completion = {
|
||||||
|
postfix = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
parameterNames = {
|
parameterNames = {
|
||||||
enabled = "all",
|
enabled = "all",
|
||||||
|
Loading…
Reference in New Issue
Block a user