dotfiles/config/automatrop/roles/vim/templates/plugins/telescope.j2
2022-01-08 16:34:39 +01:00

52 lines
1.7 KiB
Django/Jinja

{{ add_source('nvim-telescope/telescope.nvim') -}}
{# Dependencies #}
{{ add_source('nvim-lua/popup.nvim') -}}
{{ add_source('nvim-lua/plenary.nvim') -}}
{# Extensions #}
{{ add_source('nvim-telescope/telescope-fzf-native.nvim', {'do': 'make'}) -}}
noremap gF <cmd>Telescope find_files<cr>
noremap gf <cmd>Telescope git_files<cr>
noremap gB <cmd>Telescope buffers<cr>
noremap gl <cmd>Telescope current_buffer_fuzzy_find<cr>
noremap gL <cmd>Telescope live_grep<cr>
noremap gT <cmd>Telescope tags<cr>
noremap gt <cmd>Telescope treesitter<cr>
noremap gm <cmd>Telescope marks<cr>
noremap gh <cmd>Telescope oldfiles<cr>
noremap gH <cmd>Telescope command_history<cr>
noremap gS <cmd>Telescope search_history<cr>
noremap gC <cmd>Telescope commands<cr>
noremap gr <cmd>Telescope lsp_references<cr>
noremap ga <cmd>Telescope lsp_code_actions<cr>
vnoremap ga <cmd>Telescope lsp_range_code_actions<cr>
noremap ge <cmd>Telescope lsp_document_diagnostics<cr>
noremap gE <cmd>Telescope lsp_workspace_diagnostics<cr>
noremap gd <cmd>Telescope lsp_definitions<cr>
lua << EOF
require('telescope').setup{
defaults = {
vimgrep_arguments = {
'rg',
'--color=never',
'--no-heading',
'--with-filename',
'--line-number',
'--column',
'--smart-case'
},
},
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
}
}
}
require('telescope').load_extension('fzf')
EOF