Skip to content

Commit

Permalink
fix: don't emit anonymous identifiers when highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
david-christiansen committed Mar 5, 2024
1 parent 6c86509 commit 4bb7a97
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/highlighting/SubVerso/Highlighting/Code.lean
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,10 @@ partial def highlight' (ids : HashMap Lsp.RefIdent Lsp.RefIdent) (trees : Persis
| _ =>
match stx with
| .missing => pure () -- TODO emit unhighlighted string
| .ident _ _ .anonymous _ =>
-- If the anonymous identifier occurs, it's because it was a fallback for an optional
-- identifier (e.g. in `have`) and the user didn't write it.
pure ()
| stx@(.ident i _ x _) =>
match x.eraseMacroScopes with
| .str (.str _ _) _ =>
Expand Down

0 comments on commit 4bb7a97

Please sign in to comment.