Zulip Chat Archive
Stream: lean4
Topic: green code after comment
Jovan Gerbscheid (Feb 16 2024 at 19:53):
In VSCode, if I write <
followed by a letter in a comment, then the code colouring gets messed up in the rest of the file, turning regular text into green text:
/- <a -/
def foo : Nat := Nat.zero
The last line is completely green. Type-checking and hovering still work fine.
Marc Huisinga (Feb 16 2024 at 20:09):
This is probably vscode-lean4#369.
Jovan Gerbscheid (Feb 16 2024 at 20:13):
Indeed, but that mentions it being italic instead of having a different colour.
Kevin Buzzard (Feb 16 2024 at 20:59):
David's example in the issue is also green for me now (I've mentioned it on the issue).
Julian Berman (Feb 16 2024 at 21:14):
Dealing with fenced markdown is annoying -- in lean.nvim we disabled it entirely in Lean comments awhile back, hoping to have something more robust later, but I'm not sure things have gotten much better (mainly meaning I think this is still equally hard to do with tree-sitter now).
Eric Wieser (Feb 16 2024 at 22:56):
I think the highlighter was happy with this in Lean3, though I could be mistaken
Marc Huisinga (Feb 17 2024 at 09:54):
No, it's broken in vscode-lean as well. We use almost exactly the same grammar for parsing markdown - I just copied it from vscode-lean.
David Thrane Christiansen (Feb 19 2024 at 08:33):
I think that green vs italic vs other styles is a matter of your theme :)
Last updated: May 02 2025 at 03:31 UTC