diff options
| author | Robert Günzler <r@gnzler.io> | 2022-12-02 18:30:28 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-12-02 18:31:05 +0100 |
| commit | d58b8d7030bb2e8cdfd7b3ce8239fe3d5d33ba60 (patch) | |
| tree | 540b87d35a3db1e2f54b8642ede8cd0d80417fff /.vim/lua/plugins.lua | |
| parent | 46f2f2c0bba2f588e2f8648b2d2063ce85090ad0 (diff) | |
vim: move mappings into plugin callback
Diffstat (limited to '')
| -rw-r--r-- | .vim/lua/plugins.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua index 8d8baa9..287d08f 100644 --- a/.vim/lua/plugins.lua +++ b/.vim/lua/plugins.lua @@ -772,6 +772,16 @@ require('packer').startup({function() cwd = vim.fn.stdpath('config'), }) end, {desc='vim config'}) + + vim.keymap.set('n', 'gw', function() + misc.word_under_cursor(function(s) require('telescope.builtin').grep_string({ search = s }) end) + end, {desc='grep for word under cursor'}) + -- vim.keymap.set('n', '<localleader>ge', function() + -- misc.expr_under_cursor(function(s) require('telescope.builtin').grep_string({ search = s }) end) + -- end) + -- vim.keymap.set('n', '<localleader>gf', function() + -- misc.file_under_cursor(function(s) require('telescope.builtin').grep_string({ search = s }) end) + -- end) end} -- }}} use {'tpope/vim-surround'} |