From 2bd373853be5d3341c1b2c239440c709cde35bbb Mon Sep 17 00:00:00 2001 From: Ava Gaiety W Date: Fri, 20 Jun 2025 17:32:38 -0600 Subject: [PATCH] swap telescope for snacks --- nvim/lazy-lock.json | 9 ------- nvim/lua/config/keys.lua | 28 ++++++++++---------- nvim/lua/plugins/filefinder.lua | 46 --------------------------------- nvim/lua/plugins/pickers.lua | 37 ++++++++++++++++++++++++++ nvim/lua/plugins/tree.lua | 16 ------------ 5 files changed, 51 insertions(+), 85 deletions(-) delete mode 100644 nvim/lua/plugins/filefinder.lua create mode 100644 nvim/lua/plugins/pickers.lua delete mode 100644 nvim/lua/plugins/tree.lua diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 81ff5b1..9b02bf0 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -7,7 +7,6 @@ "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "codestats.nvim": { "branch": "master", "commit": "041b315c4f82997186fcdb3fc2f687cc128a28f3" }, - "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "hlargs.nvim": { "branch": "main", "commit": "ce8d705866dae44513ff48613d5e37e4da524d70" }, "inc-rename.nvim": { "branch": "main", "commit": "a3e31af13844534c66041ce92f29af7745883875" }, @@ -17,7 +16,6 @@ "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "f17d02b928a18ab88a50d374be036ab5f499fde4" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" }, "neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" }, "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, "notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" }, @@ -33,20 +31,13 @@ "nvim-treesitter-context": { "branch": "master", "commit": "1a1a7c5d6d75cb49bf64049dafab15ebe294a79f" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "d6cbb83307d516ec076d17c9a33d704ef626ee8c" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "nvim-ufo": { "branch": "main", "commit": "80fe8215ba566df2fbf3bf4d25f59ff8f41bc0e1" }, "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" }, "resession.nvim": { "branch": "master", "commit": "84c81e5fd8a94dc85a60b97089536174e558e288" }, - "smart-open.nvim": { "branch": "0.2.x", "commit": "560d8f16e17977c8303db6f9660db58a4415ca41" }, "smear-cursor.nvim": { "branch": "main", "commit": "1f90eb06eab82b5fe2ed708b94dcc325d6f5fb5a" }, - "sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" }, "switch.vim": { "branch": "main", "commit": "14b28ec7bba51c734084bab5f73aef1883fb3786" }, "symbols.nvim": { "branch": "main", "commit": "62cd4236b3eeabf3b970f225b1cc3379e11dc99c" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, - "telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" }, - "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } diff --git a/nvim/lua/config/keys.lua b/nvim/lua/config/keys.lua index 6e2ec96..7b246f1 100644 --- a/nvim/lua/config/keys.lua +++ b/nvim/lua/config/keys.lua @@ -9,20 +9,20 @@ map('n', 'w', 'bd', opts) map('n', 's', 'w', opts) map('n', 'S', 'w!', opts) map('n', '', 'za', opts) -map('n', '`', 'Neotree toggle', opts) -map('n', '~', 'SymbolsToggle', opts) -map('n', 'e', 'Neotree toggle', opts) -map('n', 'ff', "Telescope live_grep", opts) -map('n', 'fq', "Telescope quickfix", opts) -map('n', 'fr', "Telescope registers", opts) -map('n', 'f/', "Telescope current_buffer_fuzzy_find", opts) -map('n', 'flr', "Telescope lsp_references", opts) -map('n', 'fls', "Telescope treesitter", opts) -map('n', 'fld', "Telescope diagnostics", opts) -map('n', 'fgs', "Telescope git_status", opts) -map('n', 'fgb', "Telescope git_branches", opts) -map('n', 'fgc', "Telescope git_commits", opts) -map('n', 'fgC', "Telescope git_bcommits", opts) +-- map('n', '`', 'Neotree toggle', opts) +-- map('n', '~', 'SymbolsToggle', opts) +-- map('n', 'e', 'Neotree toggle', opts) +-- map('n', 'ff', "Telescope live_grep", opts) +-- map('n', 'fq', "Telescope quickfix", opts) +-- map('n', 'fr', "Telescope registers", opts) +-- map('n', 'f/', "Telescope current_buffer_fuzzy_find", opts) +-- map('n', 'flr', "Telescope lsp_references", opts) +-- map('n', 'fls', "Telescope treesitter", opts) +-- map('n', 'fld', "Telescope diagnostics", opts) +-- map('n', 'fgs', "Telescope git_status", opts) +-- map('n', 'fgb', "Telescope git_branches", opts) +-- map('n', 'fgc', "Telescope git_commits", opts) +-- map('n', 'fgC', "Telescope git_bcommits", opts) map('n', 't', "Switch", opts) map('n', 'r', "Spectre", opts) map('n', '', "", opts) diff --git a/nvim/lua/plugins/filefinder.lua b/nvim/lua/plugins/filefinder.lua deleted file mode 100644 index b106317..0000000 --- a/nvim/lua/plugins/filefinder.lua +++ /dev/null @@ -1,46 +0,0 @@ -return { - { - 'nvim-telescope/telescope.nvim', - tag = '0.1.8', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function() - -- You dont need to set any of these options. These are the default ones. Only - -- the loading is important - require('telescope').setup { - 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" - } - } - } - -- To get fzf loaded and working with telescope, you need to call - -- load_extension, somewhere after setup function: - require('telescope').load_extension('fzf') - end, - }, - { - 'nvim-telescope/telescope-fzf-native.nvim', - build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release' - }, - { - "danielfalk/smart-open.nvim", - branch = "0.2.x", - config = function() - require("telescope").load_extension("smart_open") - vim.keymap.set("n", "", function() - require("telescope").extensions.smart_open.smart_open() - end, { noremap = true, silent = true }) - end, - dependencies = { - "kkharji/sqlite.lua", - -- Only required if using match_algorithm fzf - { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, - -- Optional. If installed, native fzy will be used when match_algorithm is fzy - { "nvim-telescope/telescope-fzy-native.nvim" }, - }, - } -} diff --git a/nvim/lua/plugins/pickers.lua b/nvim/lua/plugins/pickers.lua new file mode 100644 index 0000000..cb96f98 --- /dev/null +++ b/nvim/lua/plugins/pickers.lua @@ -0,0 +1,37 @@ +return { + "folke/snacks.nvim", + ---@type snacks.Config + opts = { + picker = { + layout = { + preview = "main", + preset = "ivy", + }, + }, + }, + keys = { + { "`", function() Snacks.explorer() end, desc = "File Explorer" }, + + { "~", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" }, + { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition" }, + { "gD", function() Snacks.picker.lsp_declarations() end, desc = "Goto Declaration" }, + { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, + { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, + { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, + + { "", function() Snacks.picker.smart() end, desc = "Smart Find Files" }, + { "b", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "/", function() Snacks.picker.grep() end, desc = "Grep" }, + { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, + { "n", function() Snacks.picker.notifications() end, desc = "Notification History" }, + { "u", function() Snacks.picker.undo() end, desc = "Undo History" }, + { '"', function() Snacks.picker.registers() end, desc = "Registers" }, + + { "gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" }, + { "gl", function() Snacks.picker.git_log() end, desc = "Git Log" }, + { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, + { "gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, + { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" }, + { "gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" }, + } +} diff --git a/nvim/lua/plugins/tree.lua b/nvim/lua/plugins/tree.lua deleted file mode 100644 index 2510423..0000000 --- a/nvim/lua/plugins/tree.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - -- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information - }, - lazy = false, -- neo-tree will lazily load itself - ---@module "neo-tree" - ---@type neotree.Config? - opts = { - -- fill any relevant options here - }, -}