diff --git a/services/web/frontend/js/features/source-editor/lezer-typst/typst.grammar b/services/web/frontend/js/features/source-editor/lezer-typst/typst.grammar index 7404ac9b00..f7e05a5ba3 100644 --- a/services/web/frontend/js/features/source-editor/lezer-typst/typst.grammar +++ b/services/web/frontend/js/features/source-editor/lezer-typst/typst.grammar @@ -67,7 +67,10 @@ codeExprBody { ContentBlock } -KeywordExpr { CodeKeyword } +// CallExpr? covers '#set text(size: 12pt)', '#show heading: ...', etc. +// The optional CallExpr is only shifted when the next token is CodeIdent, +// so there is no shift/reduce conflict with other items that follow keywords. +KeywordExpr { CodeKeyword CallExpr? } AtomExpr { CodeBool } CallExpr { CodeIdent callSuffix* }