mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(java): no pattern in LspAttach autocmd
This commit is contained in:
parent
cc3dfa496e
commit
69f5a30af8
1 changed files with 35 additions and 32 deletions
|
|
@ -110,8 +110,10 @@ return {
|
|||
-- https://github.com/mfussenegger/nvim-jdtls#nvim-dap-configuration
|
||||
-- https://neovim.io/doc/user/lsp.html#LspAttach
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
pattern = "*.java",
|
||||
callback = function(args)
|
||||
-- only after the jdtls client is attached
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if client.name == "jdtls" then
|
||||
require("which-key").register({
|
||||
["<leader>cx"] = { name = "+extract" },
|
||||
["<leader>cxv"] = { require("jdtls").extract_variable_all, "Extract Variable" },
|
||||
|
|
@ -147,6 +149,7 @@ return {
|
|||
}, { mode = "n", buffer = args.buf })
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue