Closed alexmozaidze closed 2 weeks ago
I have the same issue.
// NOTE: only the first indentation is highlighted.
// NOTE: this is not
I'm using v0.10 and these are my opts
opts = {
signs = true,
highlight = {
multiline = false,
multiline_context = 0,
keyword = "fg",
before = "",
after = "",
},
},
Please note, I'm only highlighting the fg.
This is because it checks 1 character to determine a comment when, ideally, it would check a range in the buffer for comment
capture. I reckon it can be fixed using vim.treesitter.query.get
and Query:iter_captures
.
Having the same issue.
EDIT: maybe related to #180?
Most likely yes. That's why I hate merging other people's PR's for things that I don't need. If anyone wants to provide a PR to fix it, be my guest.
If not, I'll just revert #180 and #288 tomorrow
I reverted those two PRs and merged #255 instead. Not sure if that one shows the same problem, so let me know
Did some testing and seems fixed
@folke it's fixed. Thanks!
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.5
Operating system/version
Android 13 (Termux)
Describe the bug
Whenever the comment is indented, it is not recognized by
is_comment
function whenevercomments_only = true
.This was tested on the master branch of the plugin.
Steps To Reproduce
nvim a.lua
>>
Expected Behavior
It recognizes a comment by taking a line/range and checking for any
comment
captures, instead of doing so on a single character.Repro