From 4c426c808919188b343dc0f35320d86ccb033cb6 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Sat, 2 Dec 2023 18:05:21 +0900 Subject: [PATCH] new: nvim: telescope keybindings --- dotfiles/neovim/init.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index d57a70a..60b5f98 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -320,7 +320,18 @@ require('lualine_setup') ----------------------------------------------------------- -- telescope -vim.keymap.set('n', '', function() require('telescope.builtin').find_files { sort_lastused = true } end) -- fd? +local builtin = require('telescope.builtin') +vim.keymap.set('n', '', function() builtin.find_files { sort_lastused = true } end) -- fd? +vim.keymap.set('n', 'ff', function() builtin.find_files { sort_lastused = true } end) +vim.keymap.set('n', 'fw', builtin.lsp_workspace_symbols) +vim.keymap.set('n', 'fd', builtin.lsp_document_symbols) +vim.keymap.set('n', 'fb', builtin.buffers) +vim.keymap.set('n', 'fg', builtin.live_grep) +vim.keymap.set('n', 'fh', builtin.help_tags) +vim.keymap.set('n', 'fc', builtin.git_commits) +vim.keymap.set('n', 'fgc', builtin.git_commits) +vim.keymap.set('n', 'fs', builtin.git_status) +vim.keymap.set('n', 'fgs', builtin.git_status) ----------------------------------------------------------- -- Treesitter