From 5a8f990e52a7d4101c9d62c600b8075594c7dcc6 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 24 Oct 2024 01:50:29 +0300 Subject: [PATCH] chore(nvim): which-key tweaks --- config/nvim/lua/plugins/which-key.lua | 83 ++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 7 deletions(-) diff --git a/config/nvim/lua/plugins/which-key.lua b/config/nvim/lua/plugins/which-key.lua index 7d39a5e..eeee1d3 100644 --- a/config/nvim/lua/plugins/which-key.lua +++ b/config/nvim/lua/plugins/which-key.lua @@ -190,6 +190,11 @@ return { 'Lspsaga diagnostic_jump_next', desc = 'LSPSaga: Diagnostic Jump Next', }, + { + 'cx', + 'Telescope import', + desc = 'Telescope import', + }, -- ── DAP ───────────────────────────────────────────────────────────── { 'd', group = '[d] DAP' }, @@ -266,24 +271,34 @@ return { -- See: lua/plugins/telescope.lua { '', - "lua require('telescope.builtin').buffers()", + 'Telescope buffers', desc = 'Find existing buffers', }, { - '', - "lua require('telescope.builtin').commands()", + 'sc', + 'Telescope commands', desc = 'Telescope: Commands', }, { 'sd', - "lua require('telescope.builtin').diagnostics()", + 'Telescope diagnostics', desc = 'Search Diagnostics', }, { 'sg', - "lua require('telescope.builtin').live_grep()", + 'Telescope live_grep', desc = 'Search by Grep', }, + { + 'sh', + 'Telescope highlights', + desc = 'List highlights', + }, + { + 'sl', + 'Telescope luasnip', + desc = 'Search LuaSnip', + }, { 'sm', 'Telescope harpoon marks', @@ -296,7 +311,7 @@ return { }, { 'so', - "lua require('telescope.builtin').oldfiles()", + 'Telescope oldfiles', desc = 'Find recently Opened files', }, { @@ -304,10 +319,54 @@ return { "lua require('telescope').extensions.lazy_plugins.lazy_plugins()", desc = 'Find neovim/lazy configs', }, + { + 'sq', + 'Telescope quickfix', + desc = 'Quickfix list', + }, + { + 'sr', + group = 'References', + { + 'srd', + 'Telescope lsp_definitions', + desc = 'Definitions', + }, + { + 'sri', + 'Telescope lsp_implementations', + desc = 'Implementations', + }, + { + 'srp', + 'Telescope lsp_document_symbols', + desc = 'Document Symbols', + }, + { + 'srr', + 'Telescope lsp_references', + desc = 'LSP References', + }, + { + 'srt', + 'Telescope lsp_type_definitions', + desc = 'Type Definitions', + }, + { + 'srw', + 'Telescope lsp_workspace_symbols', + desc = 'Workspace Symbols', + }, + }, + { + 'ss', + 'Telescope treesitter', + desc = 'Treesitter symbols', + }, { 'st', 'TodoTelescope', desc = 'Telescope: Show Todo' }, { 'sw', - "lua require('telescope.builtin').grep_string()", + 'Telescope grep_string', desc = 'Search current Word', }, @@ -375,6 +434,16 @@ return { -- ── Help ──────────────────────────────────────────────────────────── { '?', group = '[?] Help & Cheat sheets' }, { + { + '?h', + 'Telescope help_tags', + desc = 'Help tags', + }, + { + '?m', + 'Telescope man_pages', + desc = 'Man pages', + }, { '?w', 'lua require("which-key").show({global = true})',