Skip to content

Commit

Permalink
fix: match new diagnostic sign namespace to *diagnostic/signs
Browse files Browse the repository at this point in the history
  • Loading branch information
luukvbaal committed Dec 16, 2023
1 parent 2cdad94 commit eb86c54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# statuscol.nvim

Status column plugin that provides a configurable ['statuscolumn'](https://neovim.io/doc/user/options.html#'statuscolumn') and click handlers.
Requires Neovim >= 0.9.
Requires Neovim >= 0.10.

<!-- panvimdoc-ignore-start -->

Expand Down Expand Up @@ -250,8 +250,8 @@ Below follows a list of builtin click actions.
|FoldClose/Other|Right||Delete fold|
|FoldClose/Other|Right|<kbd>clickmod</kbd>|Delete fold recursively|
|Fold*|Middle||Create fold in range(click twice)|
|Diagnostic*|Left||Open diagnostic float|
|Diagnostic*|Middle||Select available code action|
|/*diagnostic/signs|Left||Open diagnostic float|
|/*diagnostic/signs|Middle||Select available code action|
|GitSigns*/gitsigns_extmark_signs_|Left||Preview hunk|
|GitSigns*/gitsigns_extmark_signs_|Middle||Reset hunk|
|GitSigns*/gitsigns_extmark_signs_|Right||Stage hunk|
Expand Down
7 changes: 2 additions & 5 deletions lua/statuscol.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ local function get_click_args(minwid, clicks, button, mods)
end

local function call_click_func(name, args)
local handler = cfg.clickhandlers[name]
local handler = cfg.clickhandlers[name] or cfg.clickhandlers[name:match('diagnostic/signs')]
if handler then S(function() handler(args) end) end
end

Expand Down Expand Up @@ -279,10 +279,7 @@ function M.setup(user)
DapBreakpointRejected = builtin.toggle_breakpoint,
DapBreakpoint = builtin.toggle_breakpoint,
DapBreakpointCondition = builtin.toggle_breakpoint,
DiagnosticSignError = builtin.diagnostic_click,
DiagnosticSignHint = builtin.diagnostic_click,
DiagnosticSignInfo = builtin.diagnostic_click,
DiagnosticSignWarn = builtin.diagnostic_click,
["diagnostic/signs"] = builtin.diagnostic_click,
gitsigns_extmark_signs_ = builtin.gitsigns_click,
GitSignsTopdelete = builtin.gitsigns_click,
GitSignsUntracked = builtin.gitsigns_click,
Expand Down

0 comments on commit eb86c54

Please sign in to comment.