refactor(nvim): improve nvim-java setup
Some checks failed
Check Formatting of Files / Check-Formatting (push) Failing after 1m5s

This commit is contained in:
Price Hiller 2024-06-12 04:03:43 -05:00
parent 878642d009
commit 6f16a07a4e
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -152,9 +152,6 @@ return {
"Decodetalkers/csharpls-extended-lsp.nvim",
{
"williamboman/mason-lspconfig.nvim",
dependencies = {
"neovim/nvim-lspconfig",
},
opts = {
automatic_installation = true,
@ -292,20 +289,36 @@ return {
},
event = { "BufReadPre", "BufNewFile" },
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")
lspconfig.jdtls.setup({
capabilities = lsp_capabilities,
on_attach = on_attach,
init_options = {
extendedClientCapabilities = {
-- Have to disable this to make jdtls actually show hovers lol
clientHoverProvider = false,
},
},
-- HACK: Have to define this to make jdtls show hovers, etc.
init_options = {},
settings = {
java = {
completion = {
postfix = {
enabled = true,
},
},
inlayHints = {
parameterNames = {
enabled = "all",