mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
apply dpekta feedback items
This commit is contained in:
parent
01c419fae7
commit
2a619bac38
1 changed files with 14 additions and 13 deletions
|
|
@ -118,6 +118,15 @@ return {
|
||||||
dap = { hotcodereplace = "auto", config_overrides = {} },
|
dap = { hotcodereplace = "auto", config_overrides = {} },
|
||||||
dap_main = {},
|
dap_main = {},
|
||||||
test = true,
|
test = true,
|
||||||
|
settings = {
|
||||||
|
java = {
|
||||||
|
inlayHints = {
|
||||||
|
parameterNames = {
|
||||||
|
enabled = "all",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
config = function()
|
config = function()
|
||||||
|
|
@ -158,23 +167,11 @@ return {
|
||||||
init_options = {
|
init_options = {
|
||||||
bundles = bundles,
|
bundles = bundles,
|
||||||
},
|
},
|
||||||
|
settings = opts.settings,
|
||||||
-- enable CMP capabilities
|
-- enable CMP capabilities
|
||||||
capabilities = LazyVim.has("cmp-nvim-lsp") and require("cmp_nvim_lsp").default_capabilities() or nil,
|
capabilities = LazyVim.has("cmp-nvim-lsp") and require("cmp_nvim_lsp").default_capabilities() or nil,
|
||||||
}, opts.jdtls)
|
}, opts.jdtls)
|
||||||
|
|
||||||
if opts.enableInlayHints == true then
|
|
||||||
local extendedClientCapabilities = require("jdtls").extendedClientCapabilities
|
|
||||||
|
|
||||||
extend_or_override(config, {
|
|
||||||
extendedClientCapabilities = extendedClientCapabilities,
|
|
||||||
inlayHints = {
|
|
||||||
parameterNames = {
|
|
||||||
enabled = "all",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Existing server will be reused if the root_dir matches.
|
-- Existing server will be reused if the root_dir matches.
|
||||||
require("jdtls").start_or_attach(config)
|
require("jdtls").start_or_attach(config)
|
||||||
-- not need to require("jdtls.setup").add_commands(), start automatically adds commands
|
-- not need to require("jdtls.setup").add_commands(), start automatically adds commands
|
||||||
|
|
@ -195,6 +192,10 @@ return {
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
if client and client.name == "jdtls" then
|
if client and client.name == "jdtls" then
|
||||||
|
-- INFO: without this the inlay hints start toggled off by default.
|
||||||
|
-- Maybe because `nvim-jdtls` attaches on a `FileType` event??
|
||||||
|
-- Still with this the inlay hints are toggled on by default
|
||||||
|
LazyVim.toggle.inlay_hints(args.buf, true)
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.register({
|
wk.register({
|
||||||
["<leader>cx"] = { name = "+extract" },
|
["<leader>cx"] = { name = "+extract" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue