feat(forge): add gx keymap to open forge links in browser (#165)
Problem: Forge shorthand tokens like `gh:user/repo#42` are concealed in the buffer so Neovim's built-in `gx` cannot recognize them as URLs. Full URLs are also concealed, making `gx` unreliable. Solution: Add `open_link` action (default `gx`) that reads `forge_spans` from line metadata. If the cursor is on a forge token, that link opens; otherwise the last ref on the line is used. Delegates to `vim.ui.open()`.
This commit is contained in:
parent
f3ef1ca0db
commit
093e699413
4 changed files with 42 additions and 0 deletions
|
|
@ -411,6 +411,10 @@ vim.keymap.set('n', '<Plug>(pending-edit-notes)', function()
|
|||
require('pending').open_detail()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-open-link)', function()
|
||||
require('pending').open_link()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-priority-up)', function()
|
||||
require('pending').increment_priority()
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue