dotfiles/home/.config/nvim/lua/pluginconf/telescope.lua
Marko Korhonen c024a40316 Refactor neovim config (#2)
Changes include:

- [x] Use init.lua instead of init.vim
   - Some keybindings are still to be converted
- [x] Use packer as a package manager instead of vim-plug
- [ ] Use built-in lsp instead of coc.nvim
   - [x] Set up language servers
   - [x] Completion
   - [x] Formatting (previously coc-prettier, now neoformat)
   - [ ] Snippets
- [ ] Replace fzf with telescope.nvim
- [x] Implement treesitter syntax highlighting
   - More info: https://github.com/nvim-treesitter/nvim-treesitter

Note that this requires neovim nightly until 0.5 is released

Reviewed-on: #2
Co-authored-by: Marko Korhonen <marko@korhonen.cc>
Co-committed-by: Marko Korhonen <marko@korhonen.cc>
2021-08-08 15:33:23 +03:00

36 lines
1.5 KiB
Lua

require('telescope').setup {
defaults = {
vimgrep_arguments = {
'rg', '--hidden', '--color=never', '--no-heading',
'--with-filename', '--line-number', '--column', '--smart-case'
},
prompt_prefix = "> ",
selection_caret = "> ",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "descending",
layout_strategy = "horizontal",
layout_config = {
horizontal = {mirror = false},
vertical = {mirror = false}
},
file_sorter = require'telescope.sorters'.get_fuzzy_file,
file_ignore_patterns = {},
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
winblend = 0,
border = {},
borderchars = {'', '', '', '', '', '', '', ''},
color_devicons = true,
use_less = true,
path_display = {},
set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil,
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker
},
pickers = {find_files = {find_command = {"fd", "-Ht", "f"}}}
}