diff --git a/modules/programs/nvim/init.lua b/modules/programs/nvim/init.lua index 02706ab..ef1469a 100644 --- a/modules/programs/nvim/init.lua +++ b/modules/programs/nvim/init.lua @@ -145,7 +145,6 @@ local on_attach_def = function(_, bufnr) K = { "Lspsaga hover_doc ++quiet", "show info" }, [""] = { l = { - name = "lsp", d = { "Lspsaga show_cursor_diagnostics", "open diagnostic window" }, c = { "Lspsaga code_action", "code action" }, r = { "Lspsaga rename", "rename" }, @@ -159,12 +158,10 @@ local on_attach_def = function(_, bufnr) }, }, t = { - name = "toggle", l = { lsp_lines.toggle, "lsp lines" }, }, }, g = { - name = "goto", d = { "Lspsaga peek_definition", "Goto definition" }, t = { "Lspsaga peek_type_definition", "Goto type defininition" }, h = { "Lspsaga lsp_finder", "Lsp finder" }, diff --git a/modules/programs/nvim/keybinds.lua b/modules/programs/nvim/keybinds.lua index 039104d..0556448 100644 --- a/modules/programs/nvim/keybinds.lua +++ b/modules/programs/nvim/keybinds.lua @@ -4,8 +4,6 @@ require("which-key").register({ name = "buffer", b = { "Telescope buffers", "List buffers" }, d = { "bd", "Delete buffer" }, - n = { "bnext", "Next buffer" }, - p = { "bprevious", "Previous buffer" }, }, }) @@ -19,6 +17,14 @@ require("which-key").register({ d = { "c", "Delete window" }, }, }, { prefix = "" }) +require("which-key").register({ + ["["] = { + b = { "bprevious", "Previous buffer" }, + }, + ["]"] = { + b = { "bnext", "Next buffer" }, + }, +}) -- fast window move require("which-key").register({ @@ -49,10 +55,18 @@ require("which-key").register({ -- better descriptions for navigation require("which-key").register({ + [""] = { + f = { name = "file/find" }, + g = { name = "git" }, + l = { name = "lsp" }, + o = { name = "org" }, + s = { name = "search" }, + t = { name = "toggle" }, + x = { name = "diagnostics/quickfix" }, + }, ["["] = { name = "prev" }, ["]"] = { name = "next" }, - o = { name = "org" }, - x = { name = "diagnostics/quickfix" }, + g = { name = "goto" }, }) -- Clear search with diff --git a/modules/programs/nvim/plugins/telescope-nvim.lua b/modules/programs/nvim/plugins/telescope-nvim.lua index cfb87c8..95b228c 100644 --- a/modules/programs/nvim/plugins/telescope-nvim.lua +++ b/modules/programs/nvim/plugins/telescope-nvim.lua @@ -1,12 +1,10 @@ require("which-key").register({ f = { - name = "file/find", f = { "Telescope find_files", "Find files" }, b = { "Telescope buffers", "Find buffers" }, r = { "Telescope oldfiles", "Find recent files" }, }, s = { - name = "search", l = { "Telescope current_buffer_fuzzy_find", "Search lines" }, g = { "Telescope live_grep", "Live grep" }, c = { "Telescope command_history", "Command history" }, @@ -17,4 +15,8 @@ require("which-key").register({ s = { "Telescope lsp_document_symbols", "Symbols (Document)" }, S = { "Telescope lsp_workspace_symbols", "Symbols (Workspace)" }, }, + g = { + c = { "Telescope git_commits", "Commits" }, + s = { "Telescope git_status", "Status" }, + }, }, { prefix = "" }) diff --git a/modules/programs/nvim/plugins/telescope-zoxide.lua b/modules/programs/nvim/plugins/telescope-zoxide.lua index cd2c5af..e725f8d 100644 --- a/modules/programs/nvim/plugins/telescope-zoxide.lua +++ b/modules/programs/nvim/plugins/telescope-zoxide.lua @@ -1,7 +1,4 @@ require("telescope").load_extension("zoxide") require("which-key").register({ - f = { - name = "file/find", - z = { "Telescope zoxide list", "Find location (Zoxide)" }, - }, -}, { prefix = "" }) + z = { "Telescope zoxide list", "Find location (Zoxide)" }, +}, { prefix = "f" })