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
|
|
@ -83,6 +83,7 @@
|
|||
---@field priority_down_visual? string|false
|
||||
---@field cancelled? string|false
|
||||
---@field edit_notes? string|false
|
||||
---@field open_link? string|false
|
||||
|
||||
---@class pending.CategoryViewConfig
|
||||
---@field order? string[]
|
||||
|
|
@ -165,6 +166,7 @@ local defaults = {
|
|||
blocked = 'gb',
|
||||
cancelled = 'g/',
|
||||
edit_notes = 'ge',
|
||||
open_link = 'gx',
|
||||
priority_up = '<C-a>',
|
||||
priority_down = '<C-x>',
|
||||
priority_up_visual = 'g<C-a>',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue