update vimrc, add lightspeed and better grep

This commit is contained in:
Barak Michener 2021-09-18 17:20:29 -07:00
parent 48ec212fb2
commit 7ac7bf0f1f
2 changed files with 12 additions and 1 deletions

View file

@ -168,6 +168,15 @@ local dropdown = require'telescope.themes'.get_dropdown({
--winblend = 10
})
live_grep_repo = function(conf)
--local opt = dropdown
local opt = {
cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
}
for k,v in pairs(conf) do opt[k] = v end
builtin.live_grep(opt)
end
git_grep_word = function(conf)
local opt = dropdown
opt.cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]

4
.vimrc
View file

@ -218,6 +218,8 @@ Plug 'glepnir/lspsaga.nvim'
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'kristijanhusak/defx-icons'
Plug 'ggandor/lightspeed.nvim'
Plug 'Shougo/unite.vim'
" TODO: Look into Coqtail, same author
Plug 'whonore/coquille', {'branch': 'pathogen-bundle', 'for': 'coq'}
@ -1000,7 +1002,7 @@ call denite#custom#var('grep', {
"nnoremap <C-l> :<C-u>Files! `git rev-parse --show-toplevel`<CR>
"nnoremap <C-k> :<C-u>GFiles<CR>
nnoremap <C-k> <cmd>lua require('telescope.builtin').git_files()<cr>
nnoremap <silent> <Leader>ag <cmd>lua git_grep_word{ word_match = "-w", only_sort_text = true, search = ''}<cr>
nnoremap <silent> <Leader>ag <cmd>lua live_grep_repo{ word_match = "-w", only_sort_text = true, search = ''}<cr>
nnoremap <silent> <Leader>aw <cmd>lua git_grep_word{ word_match = "-w", only_sort_text = true }<cr>
" For C++ -- A is a great plugin which allows you to jump from the c file to the