diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-10-18 16:58:02 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-10-18 16:58:02 +0900 |
| commit | 1b5954dc749e5c44cb77850891a38813d9fe0207 (patch) | |
| tree | 220391829a72dd1d7f42a4296f8fd6136abfd558 /.config | |
| parent | 825dcd2a6133cdcab4d00603ec43c743edab1342 (diff) | |
| download | dotfiles-1b5954dc749e5c44cb77850891a38813d9fe0207.tar.gz dotfiles-1b5954dc749e5c44cb77850891a38813d9fe0207.tar.zst dotfiles-1b5954dc749e5c44cb77850891a38813d9fe0207.zip | |
nvim: open Redmine issue by gx
Diffstat (limited to '.config')
| -rw-r--r-- | .config/nvim/lua/init/04-mappings.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.config/nvim/lua/init/04-mappings.lua b/.config/nvim/lua/init/04-mappings.lua index 747cf93..ce13b32 100644 --- a/.config/nvim/lua/init/04-mappings.lua +++ b/.config/nvim/lua/init/04-mappings.lua @@ -509,3 +509,17 @@ K.set('n', 'Z', '<Cmd>wqall<CR>', { nowait = true }) -- `s` is used as a prefix key of plugin sandwich and hop. K.set('n', 's', '<Nop>') K.set('x', 's', '<Nop>') + + + +local redmine_host = vim.env.REDMINE_HOST +if redmine_host then + local original_ui_open = vim.ui.open + vim.ui.open = function(path, opt) + if path:match('^#%d+$') then + original_ui_open(('%s/issues/%s'):format(redmine_host, path:sub(2, -1)), opt) + else + original_ui_open(path, opt) + end + end +end |
