From b26feec89937cdfb95b8576fcb8383cdaf076fcd Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Tue, 14 Mar 2023 17:26:50 +0900 Subject: [PATCH] Fix missing descriptions on keymaps --- modules/home/nvim/lua/plugins/git.lua | 12 ++++++------ modules/home/nvim/lua/plugins/ui.lua | 27 +++++++++++++++------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/modules/home/nvim/lua/plugins/git.lua b/modules/home/nvim/lua/plugins/git.lua index 93fcffa..72043c6 100644 --- a/modules/home/nvim/lua/plugins/git.lua +++ b/modules/home/nvim/lua/plugins/git.lua @@ -38,12 +38,12 @@ return { "akinsho/git-conflict.nvim", event = "VeryLazy", keys = { - { "gxo", "(git-conflict-ours)", "Accept ours" }, - { "gxt", "(git-conflict-theirs)", "Accept theirs" }, - { "gxb", "(git-conflict-both)", "Accept both" }, - { "gx0", "(git-conflict-none)", "Accept none" }, - { "]x", "(git-conflict-prev-conflict)", "Previous conflict" }, - { "[x", "(git-conflict-next-conflict)", "Next conflict" }, + { "gxo", "(git-conflict-ours)", desc = "Accept ours" }, + { "gxt", "(git-conflict-theirs)", desc = "Accept theirs" }, + { "gxb", "(git-conflict-both)", desc = "Accept both" }, + { "gx0", "(git-conflict-none)", desc = "Accept none" }, + { "]x", "(git-conflict-prev-conflict)", desc = "Previous conflict" }, + { "[x", "(git-conflict-next-conflict)", desc = "Next conflict" }, }, opts = { default_mappings = false, diff --git a/modules/home/nvim/lua/plugins/ui.lua b/modules/home/nvim/lua/plugins/ui.lua index 39ee92d..ed1d4b4 100644 --- a/modules/home/nvim/lua/plugins/ui.lua +++ b/modules/home/nvim/lua/plugins/ui.lua @@ -80,18 +80,21 @@ return { local wk = require("which-key") wk.setup(opts) - wk.register({ - mode = { "n", "v" }, - ["g"] = { name = "+goto" }, - ["]"] = { name = "+next" }, - ["["] = { name = "+prev" }, - ["g"] = { name = "+git" }, - ["l"] = { name = "+lsp" }, - }) - local uwk = require("unimpaired-which-key") wk.register(uwk.normal_mode) wk.register(uwk.normal_and_visual_mode, { mode = { "n", "v" } }) + + wk.register({ + gx = "Git conflict", + }) + wk.register({ + mode = { "n", "v" }, + ["g"] = { name = "+goto" }, + ["]"] = { name = "+next" }, + ["["] = { name = "+prev" }, + ["g"] = { name = "+git" }, + ["l"] = { name = "+lsp" }, + }) end, }, @@ -138,9 +141,9 @@ return { { "folke/trouble.nvim", keys = { - { "ld", "Trouble document_diagnostics", "Document Diagnostics" }, - { "lw", "Trouble workspace_diagnostics", "Workspace Diagnostics" }, - { "lt", "TroubleToggle", "Toogle trouble window" }, + { "ld", "Trouble document_diagnostics", desc = "Document Diagnostics" }, + { "lw", "Trouble workspace_diagnostics", desc = "Workspace Diagnostics" }, + { "lt", "TroubleToggle", desc = "Toogle trouble window" }, }, opts = { auto_close = true,