chore(keymaps): add toggle options (#204)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2024-08-25 00:16:25 -04:00
committed by GitHub
parent 46ec0a50a7
commit 305d972849
6 changed files with 47 additions and 7 deletions

View File

@@ -492,7 +492,7 @@ function Sidebar:on_mount()
current_apply_extmark_id =
api.nvim_buf_set_extmark(self.result.bufnr, CODEBLOCK_KEYBINDING_NAMESPACE, block.start_line, -1, {
virt_text = { { " [Press <A> to Apply these patches] ", "Keyword" } },
virt_text = { { " [<A>: apply patch] ", "Keyword" } },
virt_text_pos = "right_align",
hl_group = "Keyword",
priority = PRIORITY,
@@ -1366,9 +1366,8 @@ function Sidebar:create_input()
local function show_hint()
close_hint() -- Close the existing hint window
local hint_text = "Press "
.. (vim.fn.mode() ~= "i" and Config.mappings.submit.normal or Config.mappings.submit.insert)
.. " to submit"
local hint_text = vim.fn.mode() ~= "i" and Config.mappings.submit.normal
or Config.mappings.submit.insert .. ": submit"
local buf = api.nvim_create_buf(false, true)
api.nvim_buf_set_lines(buf, 0, -1, false, { hint_text })