Closed aklk1ng closed 8 months ago
This highlighting problem seems to come from the way treesitter parses the code in your example when there is a missing }
at that spot. I am not sure if ibl
can do anything about this, since the scope highlighting depends on treesitter's parsing of the text. (#805 might make this slightly better by picking a different scope, but it won't fix the problem with the parsing.)
Yeah this is an issue in the treesitter parser. Nothing I can do to fix it, sorry.
Problem
when i type a bracket in the last line of a function, an incorrect highlight happened.
![swappy-20240107_195726](https://github.com/lukas-reineke/indent-blankline.nvim/assets/94452368/ef795b54-b11f-4889-a0fd-2a768d8fad12)
before:
after:
Steps to reproduce
config file:
test file:
steps:
1.nvim -u minimal.lua test.cpp 2.just type a bracket in the last line of the solve functionExpected behavior
highlight group:![swappy-20240107_200330](https://github.com/lukas-reineke/indent-blankline.nvim/assets/94452368/fb8d0b14-2d36-496d-b93e-5e6c63c1f995)
when i type a bracket the highlight group of main function is
IblScope
,but it should beIblIndent
Neovim version (nvim -v)
v0.10.0-dev-2047+g8df374237