NeoVim: better telescope key bindings

This commit is contained in:
Filippo Berto 2024-02-15 16:05:29 +01:00
parent b580e65d77
commit b9954f7e37
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056

View file

@ -24,6 +24,8 @@ local on_attach = function(client, bufnr)
keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts)
opts.desc = "Smart rename"
keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
opts.desc = "Smart show diagnostics"
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics", opts)
opts.desc = "Smart show buffer diagnostics"
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnr=0<CR>", opts)
opts.desc = "Smart show line diagnostics"