Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

after commenting multiple lines in lua #2

Open
ChristianChiarulli opened this issue Jul 21, 2022 · 3 comments
Open

after commenting multiple lines in lua #2

ChristianChiarulli opened this issue Jul 21, 2022 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ChristianChiarulli
Copy link
Contributor

image

@lvimuser
Copy link
Owner

Can you try the other branch?

@ChristianChiarulli
Copy link
Contributor Author

Yup that fixes it, nice work!

@lvimuser
Copy link
Owner

lvimuser commented Jul 28, 2022

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

@lvimuser lvimuser added bug Something isn't working help wanted Extra attention is needed labels Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants