another day

This commit is contained in:
Iwaniuk Krzysztof 2024-06-19 00:41:29 +02:00
parent feb59d91c5
commit 1bbc50e3a9
27 changed files with 419 additions and 246 deletions

View file

@ -2,18 +2,11 @@ return {
{
'nvim-telescope/telescope.nvim',
event = 'VimEnter',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
{
'nvim-telescope/telescope-fzf-native.nvim',
-- `build` is used to run some command when the plugin is installed/updated.
-- This is only run then, not every time Neovim starts up.
build = 'make',
-- `cond` is a condition used to determine whether this plugin should be
-- installed and loaded.
cond = function()
return vim.fn.executable 'make' == 1
end,
@ -45,18 +38,21 @@ return {
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
require('telescope').setup {
-- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()`
--
-- defaults = {
-- mappings = {
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
-- },
-- },
-- pickers = {}
defaults = {
mappings = {
i = {
['<c-enter>'] = 'to_fuzzy_refine',
},
n = {
['qq'] = 'close',
},
},
dynamic_preview_title = true,
},
pickers = {},
extensions = {
['ui-select'] = {
require('telescope.themes').get_dropdown(),
require('telescope.themes').get_ivy(),
},
},
}
@ -66,9 +62,12 @@ return {
pcall(require('telescope').load_extension, 'ui-select')
pcall(require('telescope').load_extension, 'noice')
pcall(require('telescope').load_extension, 'undo')
pcall(require('telescope').load_extension, 'yank_history')
-- See `:help telescope.builtin`
local builtin = require 'telescope.builtin'
local extensions = require('telescope').extensions
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = '[F]ind [H]elp' })
vim.keymap.set('n', '<leader>fk', builtin.keymaps, { desc = '[F]ind [K]eymaps' })
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = '[F]ind [F]iles' })
@ -77,13 +76,13 @@ return {
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = '[F]ind by [G]rep' })
vim.keymap.set('n', '<leader>fd', builtin.diagnostics, { desc = '[F]ind [D]iagnostics' })
vim.keymap.set('n', '<leader>fr', builtin.resume, { desc = '[F]ind [R]esume' })
vim.keymap.set('n', '<leader>f.', builtin.oldfiles, { desc = '[F]ind Recent Files ("." for repeat)' })
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader>f.', builtin.oldfiles, { desc = '[F]ind Recent Files [.]' })
vim.keymap.set('n', '<leader>fy', extensions.yank_history.yank_history, { desc = '[F]ind [Y]ank History' })
-- Slightly advanced example of overriding default behavior and theme
vim.keymap.set('n', '<leader>/', function()
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_ivy {
winblend = 10,
previewer = false,
})