How to set a keymap to get directly to a log of the current file? #1179
-
Hello, I'm finally digging into configuring Neogit and loving all the functionality. Tks! But how can I set a keymap to get a log_current for the file I'm in? I tried: vim.keymap.set(
"n",
"<leader>gl",
require("neogit").action("log", "log_current", { "--", "%" }),
{ desc = "Neogit Log for this file" }
) but the window came empty. |
Beta Was this translation helpful? Give feedback.
Answered by
georgeguimaraes
Feb 22, 2024
Replies: 1 comment 8 replies
-
You'll need to expand '%' via vim.fn.expand() before passing it as an argument - we don't do that for you internally. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Got it working!
I had to move the expansion out of neogit's function.