Commit Graph

21 Commits

Author SHA1 Message Date
Michael Netshipise c457cfd878 Use parent nodes for comments and raw blocks in highlights 2026-01-19 22:06:34 +02:00
Michael Netshipise 600c0eeff4 Add numbered comment and raw block variants (1-22) 2026-01-19 22:02:08 +02:00
Michael Netshipise 9562d988be Fix comment node types in highlights 2026-01-19 21:58:07 +02:00
Michael Netshipise 5a49f3dd77 Update grammar to use @fn instead of @func 2026-01-19 21:54:38 +02:00
Michael Netshipise f1bb3540ad Fix @fn to @func keyword token 2026-01-19 21:52:00 +02:00
Michael Netshipise cd4bb484b4 Fix function highlight capture to @fn
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:42:33 +02:00
Michael Netshipise 22b190fa14 Restore comment and language label highlighting
- Add back comment highlighting rules (template_comment, html_comment)
- Add embedded language name labels (json, alpine, js, css, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:40:26 +02:00
Michael Netshipise 1e72442071 Remove complex node queries that may be anonymous
Tree-sitter treats simple regex rules as anonymous nodes.
Remove queries for html_comment, template_comment, raw_block,
and embedded_language until proper named node structure is added.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:20:46 +02:00
Michael Netshipise 530fbff65a Simplify comment and raw block patterns to single regex
Remove alias() calls that referenced undefined rules, which
prevented proper node type generation. Use simple regex patterns
instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:11:32 +02:00
Michael Netshipise 7a0e24fbd4 Remove invalid node queries from highlights.scm
comment_content, raw_content, and embedded_content are regex
patterns that become anonymous nodes in tree-sitter. Remove
them from queries to fix "Invalid node type" errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:57:10 +02:00
Michael Netshipise 498a2d28e2 Update highlights.scm for new grammar nodes
Add queries for comment_content, raw_content, embedded_content,
and embedded_language nodes produced by the updated grammar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:45:49 +02:00
Michael Netshipise dc9cb74320 Fix grammar to produce queryable nodes
Use seq() with named rules instead of inline regex patterns
to ensure raw_block, template_comment, etc. produce proper
named nodes that can be queried in highlights.scm

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:42:49 +02:00
Michael Netshipise 769d8bfc51 Simplify grammar patterns for tree-sitter compatibility
- Use simple regex patterns for comments, raw blocks, embedded languages
- Add support for unquoted import paths
- Use string literals for keyword highlighting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 20:32:14 +02:00
Michael Netshipise 7c37d0b3bc Add @if/@for support in JSON/JS/CSS embedded blocks 2026-01-19 08:41:25 +02:00
Michael Netshipise b6a168a2b6 Fix for loop parsing and add @if/@for in attribute positions 2026-01-19 08:13:00 +02:00
Michael Netshipise 6d858472b2 Add @let statement support 2026-01-19 08:00:36 +02:00
Michael Netshipise f3a7ee0c2e Fix multi-asterisk comments and update highlights
- Support variable asterisk counts: @* *@, @** **@, @*** ***@
- Add template_comment_1, template_comment_2, template_comment_3 rules
- Update highlights.scm to handle all comment variants
- Fix safe_expression highlighting (use node pattern instead of literal)
- Remove invalid :: punctuation rule (inside token())

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 07:54:08 +02:00
Michael Netshipise 8ea8f5eaed Simplified highlights with standard capture names 2026-01-19 07:17:42 +02:00
Michael Netshipise f1e5e2796f Fix comment highlighting and precedence issues 2026-01-19 07:12:58 +02:00
Michael Netshipise 177b9c811c Comprehensive highlights.scm with all token types 2026-01-19 07:05:24 +02:00
Michael Netshipise 56f54d9bcb Initial commit 2026-01-19 06:22:42 +02:00