update vimrc, add lightspeed and better grep
This commit is contained in:
parent
48ec212fb2
commit
7ac7bf0f1f
2 changed files with 12 additions and 1 deletions
|
|
@ -168,6 +168,15 @@ local dropdown = require'telescope.themes'.get_dropdown({
|
||||||
--winblend = 10
|
--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)
|
git_grep_word = function(conf)
|
||||||
local opt = dropdown
|
local opt = dropdown
|
||||||
opt.cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
opt.cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||||
|
|
|
||||||
4
.vimrc
4
.vimrc
|
|
@ -218,6 +218,8 @@ Plug 'glepnir/lspsaga.nvim'
|
||||||
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
|
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||||
Plug 'kristijanhusak/defx-icons'
|
Plug 'kristijanhusak/defx-icons'
|
||||||
|
|
||||||
|
Plug 'ggandor/lightspeed.nvim'
|
||||||
|
|
||||||
Plug 'Shougo/unite.vim'
|
Plug 'Shougo/unite.vim'
|
||||||
" TODO: Look into Coqtail, same author
|
" TODO: Look into Coqtail, same author
|
||||||
Plug 'whonore/coquille', {'branch': 'pathogen-bundle', 'for': 'coq'}
|
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-l> :<C-u>Files! `git rev-parse --show-toplevel`<CR>
|
||||||
"nnoremap <C-k> :<C-u>GFiles<CR>
|
"nnoremap <C-k> :<C-u>GFiles<CR>
|
||||||
nnoremap <C-k> <cmd>lua require('telescope.builtin').git_files()<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>
|
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
|
" For C++ -- A is a great plugin which allows you to jump from the c file to the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue