mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-21 23:16:46 +00:00
mig packer to lazy and archive
Signed-off-by: d0zingcat <leewtang@gmail.com>
This commit is contained in:
37
nvim/lua/legacy/nvim_telescope.lua
Normal file
37
nvim/lua/legacy/nvim_telescope.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
local map = require('utils').map
|
||||
|
||||
-- telescope
|
||||
local actions = require('telescope.actions')
|
||||
require('telescope').setup({
|
||||
defaults = {
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
width = 0.75,
|
||||
height = 0.6,
|
||||
},
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
['<esc>'] = actions.close,
|
||||
['<C-k>'] = actions.move_selection_previous,
|
||||
['<C-j>'] = actions.move_selection_next,
|
||||
['<C-l>'] = { '<Right>', type = 'command' },
|
||||
['<C-h>'] = { '<Left>', type = 'command' },
|
||||
['<C-f>'] = actions.preview_scrolling_down,
|
||||
['<C-b>'] = actions.preview_scrolling_up,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local builtin = require('telescope.builtin')
|
||||
map('n', '<leader>ff', builtin.find_files)
|
||||
-- map('n', '<leader>fg', [[:lua require('telescope.builtin').live_grep({additional_args = {'-j8'}})<CR>]])
|
||||
map('n', '<leader>fb', builtin.buffers)
|
||||
map('n', '<leader>fg', function() builtin.live_grep({ additional_args = { '-j8' } }) end)
|
||||
map('n', '<leader>fh', builtin.help_tags)
|
||||
map('n', '<leader>;', builtin.commands)
|
||||
|
||||
-- To get fzf loaded and working with telescope, you need to call
|
||||
-- load_extension, somewhere after setup function:
|
||||
require('telescope').load_extension('fzf')
|
||||
Reference in New Issue
Block a user