add telescope
This commit is contained in:
parent
e69d64171a
commit
f1326980aa
@ -13,7 +13,33 @@ end
|
||||
|
||||
return require('packer').startup {
|
||||
function(use)
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
use {
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
run = 'make',
|
||||
config = function()
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
},
|
||||
}
|
||||
require('telescope').load_extension('fzf')
|
||||
require'telescope.themes'.get_ivy()
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<LEADER><LEADER>", ":Telescope find_files theme=get_ivy<CR>", { noremap = true })
|
||||
vim.api.nvim_set_keymap("n", "<LEADER>ff", ":Telescope find_files theme=get_ivy<CR>", { noremap = true })
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<LEADER>sp", ":Telescope live_grep theme=get_ivy<CR>", { noremap = true })
|
||||
vim.api.nvim_set_keymap("n", "<LEADER>/", ":Telescope live_grep theme=get_ivy<CR>", { noremap = true })
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<LEADER>bb", ":Telescope buffers theme=get_ivy<CR>", { noremap = true })
|
||||
vim.api.nvim_set_keymap("n", "<LEADER>,", ":Telescope buffers theme=get_ivy<CR>", { noremap = true })
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<LEADER>sb", ":Telescope current_buffer_fuzzy_find theme=get_ivy<CR>", { noremap = true })
|
||||
end
|
||||
}
|
||||
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
@ -48,20 +74,20 @@ return require('packer').startup {
|
||||
}
|
||||
|
||||
-- Fuzzy search
|
||||
use {
|
||||
'junegunn/fzf.vim',
|
||||
requires = {
|
||||
'junegunn/fzf'
|
||||
},
|
||||
config = function()
|
||||
vim.g.fzf_buffers_jump = 1
|
||||
vim.api.nvim_set_keymap('n', '<LEADER><TAB>', ':Buffers!<CR>', {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<LEADER>ff', ':Files!<CR>\'', {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<LEADER>f.', ':Files! '..vim.fn.expand('%:p:h'), {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<LEADER>f/', ':Rg!<CR>', {noremap = true})
|
||||
vim.api.nvim_set_keymap('n', '<LEADER>fg', ':GFiles!<CR>', {noremap = true})
|
||||
end
|
||||
}
|
||||
-- use {
|
||||
-- 'junegunn/fzf.vim',
|
||||
-- requires = {
|
||||
-- 'junegunn/fzf'
|
||||
-- },
|
||||
-- config = function()
|
||||
-- vim.g.fzf_buffers_jump = 1
|
||||
-- vim.api.nvim_set_keymap('n', '<LEADER><TAB>', ':Buffers!<CR>', {noremap = true})
|
||||
-- vim.api.nvim_set_keymap('n', '<LEADER>ff', ':Files!<CR>\'', {noremap = true})
|
||||
-- vim.api.nvim_set_keymap('n', '<LEADER>f.', ':Files! '..vim.fn.expand('%:p:h'), {noremap = true})
|
||||
-- vim.api.nvim_set_keymap('n', '<LEADER>f/', ':Rg!<CR>', {noremap = true})
|
||||
-- vim.api.nvim_set_keymap('n', '<LEADER>fg', ':GFiles!<CR>', {noremap = true})
|
||||
-- end
|
||||
-- }
|
||||
|
||||
-- Show indent line
|
||||
use {
|
||||
|
Loading…
Reference in New Issue
Block a user