mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-30 15:10:33 +00:00
@@ -24,8 +24,14 @@ require('telescope').setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
map('n', '<leader>ff', '<cmd>Telescope find_files<cr>')
|
local builtin = require('telescope.builtin')
|
||||||
map('n', '<leader>fg', '<cmd>Telescope live_grep<cr>')
|
map('n', '<leader>ff', builtin.find_files)
|
||||||
map('n', '<leader>fb', '<cmd>Telescope buffers<cr>')
|
-- map('n', '<leader>fg', [[:lua require('telescope.builtin').live_grep({additional_args = {'-j8'}})<CR>]])
|
||||||
map('n', '<leader>fh', '<cmd>Telescope help_tags<cr>')
|
map('n', '<leader>fb', builtin.buffers)
|
||||||
map('n', '<leader>;', '<cmd>Telescope commands<cr>')
|
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')
|
||||||
|
|||||||
@@ -96,6 +96,11 @@ return require('packer').startup(function(use)
|
|||||||
config = function()
|
config = function()
|
||||||
require('config.nvim_telescope')
|
require('config.nvim_telescope')
|
||||||
end,
|
end,
|
||||||
|
requires = {
|
||||||
|
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', config = function()
|
||||||
|
require('telescope').load_extension('fzf')
|
||||||
|
end }
|
||||||
|
},
|
||||||
})
|
})
|
||||||
use({
|
use({
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
|
|||||||
@@ -34,7 +34,11 @@ local function map(modes, lhs, rhs, opts)
|
|||||||
modes = { modes }
|
modes = { modes }
|
||||||
end
|
end
|
||||||
for _, mode in ipairs(modes) do
|
for _, mode in ipairs(modes) do
|
||||||
map_key(mode, lhs, rhs, opts)
|
if type(rhs) == "string" then
|
||||||
|
map_key(mode, lhs, rhs, opts)
|
||||||
|
else
|
||||||
|
vim.keymap.set(mode, lhs, rhs, opts)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user