feat(telescope): grep current word mapping

This commit is contained in:
Matt Leong 2021-12-20 07:00:14 -08:00
parent d634483030
commit eabc91a2ba
3 changed files with 15 additions and 7 deletions

View file

@ -92,13 +92,6 @@ return packer.startup(function()
requires = {
{ 'williamboman/nvim-lsp-installer' },
{ 'jose-elias-alvarez/nvim-lsp-ts-utils' },
{
'ray-x/lsp_signature.nvim',
config = function()
require('cosmic.plugins.lsp-signature')
end,
after = 'nvim-lspconfig',
},
{
'jose-elias-alvarez/null-ls.nvim',
config = function()
@ -107,6 +100,14 @@ return packer.startup(function()
disable = vim.tbl_contains(user_plugins.disable, 'null-ls'),
after = 'nvim-lspconfig',
},
{
'ray-x/lsp_signature.nvim',
config = function()
require('cosmic.plugins.lsp-signature')
end,
after = 'nvim-lspconfig',
disable = vim.tbl_contains(user_plugins.disable, 'lsp_signature'),
},
},
})

View file

@ -56,6 +56,7 @@ require('telescope').setup(vim.tbl_deep_extend('force', {
'--line-number',
'--column',
'--smart-case',
'--trim',
},
},
extensions = {
@ -118,6 +119,11 @@ require('telescope').setup(vim.tbl_deep_extend('force', {
prompt_title = '✨ Live Grep ✨',
mappings = default_mappings,
},
grep_string = {
initial_mode = 'normal',
prompt_title = '✨ Grep String ✨',
mappings = default_mappings,
},
},
}, config.telescope or {}))

View file

@ -15,6 +15,7 @@ M.init = function()
map('n', '<leader>fp', ':Telescope find_files<cr>')
map('n', '<leader>fk', ':Telescope buffers<cr>')
map('n', '<leader>fs', ':Telescope live_grep<cr>')
map('n', '<leader>fw', ':Telescope grep_string<cr>')
-- git navigation
map('n', '<leader>ggc', ':Telescope git_commits<cr>')