use telescope for more nvim UIs

This commit is contained in:
LordMZTE 2022-11-29 21:45:00 +01:00
parent 0fe952479d
commit fe9fe412fb
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
1 changed files with 8 additions and 6 deletions

View File

@ -22,15 +22,17 @@ map("n", "<F4>", "<cmd>:cnext<CR>", opts)
map("n", "<S-F4>", "<cmd>:cprevious<CR>", opts)
-- See `:help vim.lsp.*` for documentation on any of the below functions
map("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
map("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
map("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
map("n", "-n", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
map("n", "-a", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
map("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
map("n", "<space>e", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
map("n", "-d", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts)
map("n", "-n", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
map("n", "-r", "<cmd>lua vim.lsp.buf.format { asnyc = true }<CR>", opts)
map("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
map("n", "<space>e", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
map("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
map("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts)
map("n", "gi", "<cmd>Telescope lsp_implementations<CR>", opts)
map("n", "gp", "<cmd>Telescope diagnostics bufnr=0<CR>", opts)
map("n", "gr", "<cmd>Telescope lsp_references<CR>", opts)
-- command to stop LSP servers
vim.api.nvim_create_user_command("StopLsps", function()