dotfiles/config/automatrop/roles/vim/templates/plugins/telescope.j2

53 lines
1.8 KiB
Plaintext
Raw Normal View History

2021-07-04 09:54:33 +02:00
{{ add_source('nvim-telescope/telescope.nvim') -}}
{# Dependencies #}
{{ add_source('nvim-lua/popup.nvim') -}}
{{ add_source('nvim-lua/plenary.nvim') -}}
2022-01-08 16:34:39 +01:00
{# Extensions #}
{{ add_source('nvim-telescope/telescope-fzf-native.nvim', {'do': 'make'}) -}}
2021-07-04 09:54:33 +02:00
noremap gF <cmd>Telescope find_files<cr>
noremap gf <cmd>Telescope git_files<cr>
2021-07-04 22:47:10 +02:00
noremap gB <cmd>Telescope buffers<cr>
2021-07-04 09:54:33 +02:00
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>
2022-01-08 16:34:39 +01:00
noremap gC <cmd>Telescope commands<cr>
2021-07-04 09:54:33 +02:00
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>
2022-11-20 14:01:21 +01:00
noremap gs <cmd>Telescope lsp_document_symbols<cr>
2021-07-04 09:54:33 +02:00
lua << EOF
require('telescope').setup{
defaults = {
vimgrep_arguments = {
'rg',
'--color=never',
'--no-heading',
'--with-filename',
'--line-number',
'--column',
'--smart-case'
},
2022-01-08 16:34:39 +01:00
},
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"
}
2021-07-04 09:54:33 +02:00
}
}
2022-01-08 16:34:39 +01:00
require('telescope').load_extension('fzf')
2021-07-04 09:54:33 +02:00
EOF