nvim: run live_grep in project root, add registers
This commit is contained in:
parent
cfbd482dee
commit
69bd289324
|
@ -38,15 +38,18 @@ packer.use {
|
|||
}
|
||||
}
|
||||
|
||||
map('n', '<Leader>tb', require('telescope.builtin').buffers)
|
||||
local builtin = require('telescope.builtin')
|
||||
local my = require('my.functions')
|
||||
map('n', '<Leader>tb', builtin.buffers)
|
||||
map('n', '<Leader>tf', function()
|
||||
require('telescope.builtin').find_files({
|
||||
cwd = require('my.functions').get_project_root()
|
||||
})
|
||||
builtin.find_files({ cwd = my.get_project_root() })
|
||||
end)
|
||||
map('n', '<Leader>tr', require('telescope.builtin').oldfiles)
|
||||
map('n', '<Leader>tg', require('telescope.builtin').live_grep)
|
||||
map('n', '<Leader>tm', require('telescope.builtin').man_pages)
|
||||
map('n', '<Leader>tr', builtin.oldfiles)
|
||||
map('n', '<Leader>tg', function()
|
||||
builtin.live_grep({ cwd = my.get_project_root() })
|
||||
end)
|
||||
map('n', '<Leader>tm', builtin.man_pages)
|
||||
map('n', '<Leader>tp', builtin.registers)
|
||||
end
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user