Update which-key config format
This commit is contained in:
parent
7700dfc590
commit
75fe9f8ddb
1 changed files with 16 additions and 16 deletions
|
|
@ -81,23 +81,23 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
|
||||
-- Descriptions for lspconfig mappings
|
||||
local wk = require("which-key")
|
||||
wk.register({
|
||||
["<leader>e"] = { vim.diagnostic.open_float, "Show diagnostics" },
|
||||
["[["] = { vim.diagnostic.goto_prev, "Previous diagnostic" },
|
||||
["]]"] = { vim.diagnostic.goto_next, "Next diagnostic" },
|
||||
["<leader>q"] = { vim.diagnostic.setloclist, "Set location list" },
|
||||
["gD"] = { vim.lsp.buf.declaration, "Goto declaration" },
|
||||
["gd"] = { vim.lsp.buf.definition, "Goto definition" },
|
||||
["K"] = { vim.lsp.buf.hover, "Hover" },
|
||||
["gi"] = { vim.lsp.buf.implementation, "Goto implementation" },
|
||||
["<C-k>"] = { vim.lsp.buf.signature_help, "Signature help" },
|
||||
["<leader>D"] = { vim.lsp.buf.type_definition, "Goto type definition" },
|
||||
["<leader>ra"] = { vim.lsp.buf.rename, "Rename" },
|
||||
["<leader>ca"] = { vim.lsp.buf.code_action, "Code action" },
|
||||
["gr"] = { vim.lsp.buf.references, "Goto references" },
|
||||
["<leader>fm"] = { function()
|
||||
wk.add({
|
||||
{"<leader>e", vim.diagnostic.open_float, desc = "Show diagnostics" },
|
||||
{"[[", vim.diagnostic.goto_prev, desc = "Previous diagnostic" },
|
||||
{"]]", vim.diagnostic.goto_next, desc = "Next diagnostic" },
|
||||
{"<leader>q", vim.diagnostic.setloclist, desc = "Set location list" },
|
||||
{"gD", vim.lsp.buf.declaration, desc = "Goto declaration" },
|
||||
{"gd", vim.lsp.buf.definition, desc = "Goto definition" },
|
||||
{"K", vim.lsp.buf.hover, desc = "Hover" },
|
||||
{"gi", vim.lsp.buf.implementation, desc = "Goto implementation" },
|
||||
{"<C-k>", vim.lsp.buf.signature_help, desc = "Signature help" },
|
||||
{"<leader>D", vim.lsp.buf.type_definition, desc = "Goto type definition" },
|
||||
{"<leader>ra", vim.lsp.buf.rename, desc = "Rename" },
|
||||
{"<leader>ca", vim.lsp.buf.code_action, desc = "Code action" },
|
||||
{"gr", vim.lsp.buf.references, desc = "Goto references" },
|
||||
{"<leader>fm", function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end, "Format" },
|
||||
end, desc = "Format" },
|
||||
})
|
||||
|
||||
-- DAP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue