From 09c261979711c06c8403fe01b2f75adb6d7f983e Mon Sep 17 00:00:00 2001 From: Gregory Trolliet Date: Sun, 20 Oct 2024 10:24:04 +0200 Subject: [PATCH] [nvim] Add some Telescope commands --- .config/nvim/init.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 8fe1c56..9deb399 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -20,11 +20,17 @@ require("core.options") options = { noremap = true } map('n', 'ff', ':Telescope find_files', options) map('n', 'fg', ':Telescope git_files', options) -map('n', 'gc', ':Telescope git_commits', options) +map('n', 'fc', ':Telescope git_commits', options) map('n', 'fl', ':Telescope live_grep', options) map('n', '', ':Telescope buffers', options) map('n', 't', ':TagbarToggle', options) +map('n', 'nv', ':Telescope find_files cwd=~/.config/nvim', options) +map('n', 'nc', ':Telescope find_files cwd=~/.config', options) +map('n', 'gd', ':Telescope lsp_definitions', options) +map('n', 'gr', ':Telescope lsp_references', options) +map('n', 'gs', ':Telescope lsp_workspace_symbols', options) +map('n', 'gS', ':Telescope lsp_dynamic_workspace_symbols', options) -------------------------------------------------- -- Telescope @@ -59,11 +65,11 @@ vim.api.nvim_create_autocmd('LspAttach', { local opts = {buffer = event.buf} vim.keymap.set('n', 'K', 'lua vim.lsp.buf.hover()', opts) - vim.keymap.set('n', 'gd', 'lua vim.lsp.buf.definition()', opts) + --vim.keymap.set('n', 'gd', 'lua vim.lsp.buf.definition()', opts) vim.keymap.set('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) vim.keymap.set('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) vim.keymap.set('n', 'go', 'lua vim.lsp.buf.type_definition()', opts) - vim.keymap.set('n', 'gr', 'lua vim.lsp.buf.references()', opts) + --vim.keymap.set('n', 'gr', 'lua vim.lsp.buf.references()', opts) vim.keymap.set('n', 'gs', 'lua vim.lsp.buf.signature_help()', opts) vim.keymap.set('n', '', 'lua vim.lsp.buf.rename()', opts) vim.keymap.set({'n', 'x'}, '', 'lua vim.lsp.buf.format({async = true})', opts)