Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested list item with 4 indents is concealed unexpectedly #127

Open
amuuname opened this issue Nov 29, 2023 · 5 comments
Open

Nested list item with 4 indents is concealed unexpectedly #127

amuuname opened this issue Nov 29, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@amuuname
Copy link

Describe the bug
First of all, thanks for working on this amazing parser!

After the recent update, the list_marker of the first nested list item with 4 spaces is concealed to nothing (``) while the following nested list items are concealed as expected.
Please refer to below example.

Code example

- a list item with 4 spaces
    - first nested list item  <-- the `list_marker_minus` is concealed to blank
    - second nested list item <-- conceal works fine
    - third & more list items <-- conceal works fine

- a list item with 2 spaces
  - first nested list item <-- works fine
  - more items             <-- works fine

Expected behavior
List item marker (-,+,*) should be concealed regardless of the tab size (2 or 4)

@amuuname amuuname added the bug Something isn't working label Nov 29, 2023
@ribru17
Copy link

ribru17 commented Nov 29, 2023

Apologies, this is an issue with nvim-treesitter, see this issue

@amuuname
Copy link
Author

Ah-ha! Didn't notice there was an existing issue. Thank you! :)

@clason
Copy link
Collaborator

clason commented Nov 30, 2023

That commit has been reverted; nevertheless, the original cause is due to the parser capturing inconsistent (item number dependent) whitespace around the marker. If this can be fixed, we can re-enable those conceals. (If not, this issue can be closed.) @MDeiml

@MDeiml
Copy link
Collaborator

MDeiml commented Nov 30, 2023

So the first list item captures more whitespace (before the marker) than the following ones? Gonna check that out when I have time.

@clason
Copy link
Collaborator

clason commented Nov 30, 2023

The second does; see the the screenshot from the linked issue:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants