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

Broken syntax highlighting in Markdown #3849

Closed
David-Else opened this issue Sep 15, 2022 · 7 comments
Closed

Broken syntax highlighting in Markdown #3849

David-Else opened this issue Sep 15, 2022 · 7 comments
Labels
A-tree-sitter Area: Tree-sitter C-bug Category: This is a bug

Comments

@David-Else
Copy link
Contributor

Summary

@MDeiml In the keymap.md file you can see the markdown highlighting is broken, is seems fine in Neovim

Helix

Screenshot from 2022-09-15 14-37-50

Screenshot from 2022-09-15 14-38-01

Neovim

Screenshot from 2022-09-15 14-37-45

Reproduction Steps

Load https://raw.githubusercontent.com/helix-editor/helix/master/book/src/keymap.md to see the problem

Helix log

n/a

Platform

Linux

Terminal Emulator

Kitty

Helix Version

helix 22.08.1 (b5be72b) < latest today

@David-Else David-Else added the C-bug Category: This is a bug label Sep 15, 2022
@kirawi kirawi added the A-tree-sitter Area: Tree-sitter label Sep 15, 2022
@Chickenkeeper
Copy link
Contributor

Chickenkeeper commented Sep 28, 2022

Updating the version of tree-sitter-markdown in languages.toml to the latest commit helps with this issue, so that might tide things over for now. It doesn't completely fix it though, there's some weirdness caused by escape sequences for example, so more work is still needed there.

@David-Else
Copy link
Contributor Author

@Chickenkeeper Thanks for your help! Updating to the latest commit does improve things, but I am not sure if the queries also need updating? I don't know much about Treesitter.

I have opened an issue tree-sitter-grammars/tree-sitter-markdown#62, please add any more weirdness caused by escape sequences or extra details you can think of. Cheers!

@Chickenkeeper
Copy link
Contributor

@David-Else Ha, will do. I've looked at the queries and nothing immediately stood out, but it might take a bit of experimenting.

@MDeiml
Copy link
Contributor

MDeiml commented Sep 30, 2022

Updating to the latest commit helped, because I added support for tables. The queries should be fine. You would only need to change them if you wanted some special highlighting for tables.

@MDeiml
Copy link
Contributor

MDeiml commented Sep 30, 2022

Other problems (like thos discussed in tree-sitter-grammars/tree-sitter-markdown#62) might be problems with the parser, so feel free to report them there.

@MDeiml
Copy link
Contributor

MDeiml commented Oct 27, 2022

I added a nice new fix so most of what is talked about here works now. I'll make a PR to update the grammar.

@David-Else
Copy link
Contributor Author

Brilliant, it is fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tree-sitter Area: Tree-sitter C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

4 participants