Nvim: use telescope pickers for more lsp stuff

This commit is contained in:
Marko Korhonen 2023-09-18 16:47:46 +03:00
parent 78bff95587
commit 949319f1a9

View file

@ -57,13 +57,14 @@ function m.setup()
end end
function m.map_keys() function m.map_keys()
local telescope_builtin = require("telescope.builtin")
require("which-key").register({ require("which-key").register({
g = { g = {
name = "Go to", name = "Go to",
d = { vim.lsp.buf.definition, "Definition" }, d = { vim.lsp.buf.definition, "Definition" },
D = { vim.lsp.buf.declaration, "Declaration" }, D = { vim.lsp.buf.declaration, "Declaration" },
i = { vim.lsp.buf.implementation, "Implementation" }, i = { telescope_builtin.lsp_implementations, "Implementation" },
r = { vim.lsp.buf.references, "References" }, r = { telescope_builtin.lsp_references, "References" },
}, },
["<leader>"] = { ["<leader>"] = {
name = "Leader", name = "Leader",