diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-04-24 20:34:48 +0300 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-04-24 20:34:48 +0300 |
| commit | 67a4bc03ac81be48911de51337e1065cfe96425b (patch) | |
| tree | e6f3378f5a0b2cbd59bf391a1d3a834877d45b85 /.config/nvim/lua/plugins | |
| parent | 1ccaffed4d0c6aac8528f6ef9e583f91c772c36c (diff) | |
Replaced telescope and trouble with snacks picker
Diffstat (limited to '.config/nvim/lua/plugins')
| -rw-r--r-- | .config/nvim/lua/plugins/snacks.lua | 116 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/telescope.lua | 22 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/todo-comments.lua | 19 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/trouble.lua | 40 |
4 files changed, 131 insertions, 66 deletions
diff --git a/.config/nvim/lua/plugins/snacks.lua b/.config/nvim/lua/plugins/snacks.lua index 5e00a23..02c5e35 100644 --- a/.config/nvim/lua/plugins/snacks.lua +++ b/.config/nvim/lua/plugins/snacks.lua @@ -23,6 +23,7 @@ return { return true end, }, + picker = {}, }, keys = { { @@ -45,11 +46,11 @@ return { }, { - '<leader>si', + '<leader>ri', function() Snacks.image.hover() end, - desc = '[S]how [I]mage', + desc = '[R]ender [I]mage', }, { @@ -66,5 +67,116 @@ return { end, desc = '[N]otification [H]istory', }, + + { + '<leader>sp', + function() + Snacks.picker.pickers({ layout = 'telescope' }) + end, + desc = '[S]how [P]ickers', + }, + { + '<leader>fs', + function() + Snacks.picker.files({ + layout = 'telescope', + hidden = true, + follow = true, + }) + end, + desc = '[F]ile [S]ystem', + }, + { + '<leader>lv', + function() + Snacks.picker.grep({ + layout = 'telescope', + hidden = true, + follow = true, + }) + end, + desc = '[L]ive [G]rep', + }, + { + 'gi', + function() + Snacks.picker.lsp_implementations() + end, + { desc = '[G]oto [I]mplementations' }, + }, + { + 'gt', + function() + Snacks.picker.lsp_type_definitions() + end, + { desc = '[G]oto [T]ype Definitions' }, + }, + { + '<leader>ds', + function() + Snacks.picker.lsp_symbols({ layout = 'telescope' }) + end, + desc = '[D]ocument [S]ymbols', + }, + { + '<leader>ps', + function() + Snacks.picker.lsp_workspace_symbols({ layout = 'telescope' }) + end, + desc = '[P]roject [S]ymbols', + }, + { + '<leader>di', + function() + Snacks.picker.diagnostics({ layout = 'telescope' }) + end, + desc = '[Di]agnostics', + }, + { + '<leader>dl', + function() + Snacks.picker.diagnostics_buffer({ layout = 'telescope' }) + end, + desc = '[D]iagnostics [L]ocal', + }, + { + '<leader>fh', + function() + Snacks.picker.help({ layout = 'telescope' }) + end, + desc = '[F]ind [H]elp', + }, + { + '<leader>hi', + function() + Snacks.picker.highlights({ + layout = 'telescope', + hidden = true, + follow = true, + }) + end, + desc = '[Hi]light Groups', + }, + { + '<leader>si', + function() + Snacks.picker.icons({ layout = 'select' }) + end, + desc = '[S]earch [I]cons', + }, + { + '<leader>sk', + function() + Snacks.picker.keymaps({ layout = 'dropdown' }) + end, + desc = '[S]earch [K]eymaps', + }, + { + '<leader>th', + function() + Snacks.picker.colorschemes({ layout = 'dropdown' }) + end, + desc = '[T]hemes [P]icker', + }, }, } diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua deleted file mode 100644 index b3e09af..0000000 --- a/.config/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - 'nvim-telescope/telescope.nvim', - tag = '0.1.5', - dependencies = { - 'nvim-lua/plenary.nvim', - { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, - 'nvim-telescope/telescope-ui-select.nvim', - }, - cmd = 'Telescope', - config = function() - require('telescope_helper') - end, - keys = { - '<leader>fs', - '<leader>fa', - '<leader>fh', - '<leader>fm', - '<leader>lv', - '<leader>f.', - '<leader>th', - }, -} diff --git a/.config/nvim/lua/plugins/todo-comments.lua b/.config/nvim/lua/plugins/todo-comments.lua index 799afd8..b19ad05 100644 --- a/.config/nvim/lua/plugins/todo-comments.lua +++ b/.config/nvim/lua/plugins/todo-comments.lua @@ -13,8 +13,23 @@ return { dependencies = { 'nvim-lua/plenary.nvim' }, event = 'VeryLazy', keys = { - { '<leader>st', '<cmd>TodoTelescope keywords=TODO,FIX<cr>', desc = '[S]earch [T]odos' }, - { '<leader>lt', '<cmd>TodoTrouble<cr>', desc = '[L]ist [T]odos' }, + { + '<leader>st', + function() + Snacks.picker.todo_comments({ + layout = 'telescope', + keywords = { 'TODO', 'FIX', 'FIXME', 'BUG', 'ISSUE', 'OPTIMIZE' }, + }) + end, + desc = '[S]earch [T]odos', + }, + { + '<leader>sn', + function() + Snacks.picker.todo_comments({ layout = 'telescope' }) + end, + desc = '[S]earch [N]otes', + }, }, config = function() require('todo-comments').setup({ diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua deleted file mode 100644 index 3239aa7..0000000 --- a/.config/nvim/lua/plugins/trouble.lua +++ /dev/null @@ -1,40 +0,0 @@ -return { - 'folke/trouble.nvim', - opts = {}, - cmd = 'Trouble', - -- TODO: Consider maybe using this for outlines (code structure) - -- and also configuring some of the keys to better fit me - -- and probably removing most of them in the process - keys = { - { - '<leader>xx', - '<cmd>Trouble diagnostics toggle<cr>', - desc = 'Diagnostics (Trouble)', - }, - { - '<leader>xX', - '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', - desc = 'Buffer Diagnostics (Trouble)', - }, - { - '<leader>cs', - '<cmd>Trouble symbols toggle focus=false<cr>', - desc = 'Symbols (Trouble)', - }, - { - '<leader>cl', - '<cmd>Trouble lsp toggle focus=false win.position=right<cr>', - desc = 'LSP Definitions / references / ... (Trouble)', - }, - { - '<leader>xL', - '<cmd>Trouble loclist toggle<cr>', - desc = 'Location List (Trouble)', - }, - { - '<leader>xQ', - '<cmd>Trouble qflist toggle<cr>', - desc = 'Quickfix List (Trouble)', - }, - }, -} |
