lsp-inlayhints.nvim
lsp-inlayhints.nvim copied to clipboard
after commenting multiple lines in lua
Can you try the other branch?
Yup that fixes it, nice work!
This seems to a problem with numToStr/Comment.nvim
; same behavior with builtin codelens.
The extmarks do not get pushed to the line below when using macros, visual block or vim-visual-multi
. As such, I don't think there's anything to be done on our side.
A possible workaround is to clear the ext mark before commenting (https://github.com/numToStr/Comment.nvim#pre-hook)
pre_hook = function(ctx)
local line_start = (ctx.srow or ctx.range.srow) - 1
local line_end = ctx.erow or ctx.range.erow
require("lsp-inlayhints.core").clear(0, line_start, line_end)
-- or vim.api.nvim_buf_clear_namespace(0, -1, line_start, line_end)
end