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
|
-- Descriptions for lspconfig mappings
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.register({
|
wk.add({
|
||||||
["<leader>e"] = { vim.diagnostic.open_float, "Show diagnostics" },
|
{"<leader>e", vim.diagnostic.open_float, desc = "Show diagnostics" },
|
||||||
["[["] = { vim.diagnostic.goto_prev, "Previous diagnostic" },
|
{"[[", vim.diagnostic.goto_prev, desc = "Previous diagnostic" },
|
||||||
["]]"] = { vim.diagnostic.goto_next, "Next diagnostic" },
|
{"]]", vim.diagnostic.goto_next, desc = "Next diagnostic" },
|
||||||
["<leader>q"] = { vim.diagnostic.setloclist, "Set location list" },
|
{"<leader>q", vim.diagnostic.setloclist, desc = "Set location list" },
|
||||||
["gD"] = { vim.lsp.buf.declaration, "Goto declaration" },
|
{"gD", vim.lsp.buf.declaration, desc = "Goto declaration" },
|
||||||
["gd"] = { vim.lsp.buf.definition, "Goto definition" },
|
{"gd", vim.lsp.buf.definition, desc = "Goto definition" },
|
||||||
["K"] = { vim.lsp.buf.hover, "Hover" },
|
{"K", vim.lsp.buf.hover, desc = "Hover" },
|
||||||
["gi"] = { vim.lsp.buf.implementation, "Goto implementation" },
|
{"gi", vim.lsp.buf.implementation, desc = "Goto implementation" },
|
||||||
["<C-k>"] = { vim.lsp.buf.signature_help, "Signature help" },
|
{"<C-k>", vim.lsp.buf.signature_help, desc = "Signature help" },
|
||||||
["<leader>D"] = { vim.lsp.buf.type_definition, "Goto type definition" },
|
{"<leader>D", vim.lsp.buf.type_definition, desc = "Goto type definition" },
|
||||||
["<leader>ra"] = { vim.lsp.buf.rename, "Rename" },
|
{"<leader>ra", vim.lsp.buf.rename, desc = "Rename" },
|
||||||
["<leader>ca"] = { vim.lsp.buf.code_action, "Code action" },
|
{"<leader>ca", vim.lsp.buf.code_action, desc = "Code action" },
|
||||||
["gr"] = { vim.lsp.buf.references, "Goto references" },
|
{"gr", vim.lsp.buf.references, desc = "Goto references" },
|
||||||
["<leader>fm"] = { function()
|
{"<leader>fm", function()
|
||||||
vim.lsp.buf.format { async = true }
|
vim.lsp.buf.format { async = true }
|
||||||
end, "Format" },
|
end, desc = "Format" },
|
||||||
})
|
})
|
||||||
|
|
||||||
-- DAP
|
-- DAP
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue