diff options
| -rw-r--r-- | .config/nvim/lua/init/04-mappings.lua | 14 | ||||
| -rw-r--r-- | home-manager/modules/work.nix | 1 |
2 files changed, 15 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 diff --git a/home-manager/modules/work.nix b/home-manager/modules/work.nix index 47e0d9e..9de1a21 100644 --- a/home-manager/modules/work.nix +++ b/home-manager/modules/work.nix @@ -7,5 +7,6 @@ { home.sessionVariables = { GITLAB_HOST = "https://gitlab.dcdev.jp"; + REDMINE_HOST = "https://redmine.dcdev.jp"; }; } |
