swap telescope for snacks
This commit is contained in:
parent
d5865078b1
commit
2bd373853b
5 changed files with 51 additions and 85 deletions
|
@ -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" }
|
||||
|
|
|
@ -9,20 +9,20 @@ map('n', '<leader>w', '<Cmd>bd<CR>', opts)
|
|||
map('n', '<leader>s', '<Cmd>w<CR>', opts)
|
||||
map('n', '<leader>S', '<Cmd>w!<CR>', opts)
|
||||
map('n', '<Enter>', 'za<CR>', opts)
|
||||
map('n', '`', '<Cmd>Neotree toggle<CR>', opts)
|
||||
map('n', '~', '<Cmd>SymbolsToggle<CR>', opts)
|
||||
map('n', '<leader>e', '<Cmd>Neotree toggle<CR>', opts)
|
||||
map('n', '<leader>ff', "<Cmd>Telescope live_grep<CR>", opts)
|
||||
map('n', '<leader>fq', "<Cmd>Telescope quickfix<CR>", opts)
|
||||
map('n', '<leader>fr', "<Cmd>Telescope registers<CR>", opts)
|
||||
map('n', '<leader>f/', "<Cmd>Telescope current_buffer_fuzzy_find<CR>", opts)
|
||||
map('n', '<leader>flr', "<Cmd>Telescope lsp_references<CR>", opts)
|
||||
map('n', '<leader>fls', "<Cmd>Telescope treesitter<CR>", opts)
|
||||
map('n', '<leader>fld', "<Cmd>Telescope diagnostics<CR>", opts)
|
||||
map('n', '<leader>fgs', "<Cmd>Telescope git_status<CR>", opts)
|
||||
map('n', '<leader>fgb', "<Cmd>Telescope git_branches<CR>", opts)
|
||||
map('n', '<leader>fgc', "<Cmd>Telescope git_commits<CR>", opts)
|
||||
map('n', '<leader>fgC', "<Cmd>Telescope git_bcommits<CR>", opts)
|
||||
-- map('n', '`', '<Cmd>Neotree toggle<CR>', opts)
|
||||
-- map('n', '~', '<Cmd>SymbolsToggle<CR>', opts)
|
||||
-- map('n', '<leader>e', '<Cmd>Neotree toggle<CR>', opts)
|
||||
-- map('n', '<leader>ff', "<Cmd>Telescope live_grep<CR>", opts)
|
||||
-- map('n', '<leader>fq', "<Cmd>Telescope quickfix<CR>", opts)
|
||||
-- map('n', '<leader>fr', "<Cmd>Telescope registers<CR>", opts)
|
||||
-- map('n', '<leader>f/', "<Cmd>Telescope current_buffer_fuzzy_find<CR>", opts)
|
||||
-- map('n', '<leader>flr', "<Cmd>Telescope lsp_references<CR>", opts)
|
||||
-- map('n', '<leader>fls', "<Cmd>Telescope treesitter<CR>", opts)
|
||||
-- map('n', '<leader>fld', "<Cmd>Telescope diagnostics<CR>", opts)
|
||||
-- map('n', '<leader>fgs', "<Cmd>Telescope git_status<CR>", opts)
|
||||
-- map('n', '<leader>fgb', "<Cmd>Telescope git_branches<CR>", opts)
|
||||
-- map('n', '<leader>fgc', "<Cmd>Telescope git_commits<CR>", opts)
|
||||
-- map('n', '<leader>fgC', "<Cmd>Telescope git_bcommits<CR>", opts)
|
||||
map('n', '<leader>t', "<Cmd>Switch<CR>", opts)
|
||||
map('n', '<leader>r', "<Cmd>Spectre<CR>", opts)
|
||||
map('n', '<Up>', "<C-a>", opts)
|
||||
|
|
|
@ -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", "<leader><leader>", 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" },
|
||||
},
|
||||
}
|
||||
}
|
37
nvim/lua/plugins/pickers.lua
Normal file
37
nvim/lua/plugins/pickers.lua
Normal file
|
@ -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" },
|
||||
|
||||
{ "<leader><leader>", function() Snacks.picker.smart() end, desc = "Smart Find Files" },
|
||||
{ "<leader>b", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||
{ "<leader>/", function() Snacks.picker.grep() end, desc = "Grep" },
|
||||
{ "<leader>:", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||
{ "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
||||
{ "<leader>u", function() Snacks.picker.undo() end, desc = "Undo History" },
|
||||
{ '<leader>"', function() Snacks.picker.registers() end, desc = "Registers" },
|
||||
|
||||
{ "<leader>gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" },
|
||||
{ "<leader>gl", function() Snacks.picker.git_log() end, desc = "Git Log" },
|
||||
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
|
||||
{ "<leader>gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" },
|
||||
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" },
|
||||
{ "<leader>gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" },
|
||||
}
|
||||
}
|
|
@ -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
|
||||
},
|
||||
}
|
Loading…
Add table
Reference in a new issue