Add tree-sitter Crocq grammar + annotation language features #5

Merged
marfavi merged 43 commits from tree-sitter into main 2026-10-02 14:19:03 +02:00
Owner

tree-sitter-crocq project added
integrated into extension with basic features

tree-sitter-crocq project added integrated into extension with basic features
update ci for tree-sitter crocq
Some checks failed
CI / Format, types, lint, tests (pull_request) Failing after 24s
d87cf74c88
install make in ci
Some checks failed
CI / Format, types, lint, tests (pull_request) Failing after 39s
86e10f8c7f
change tree-sitter cli devdependecy
Some checks failed
CI / Format, types, lint, tests (pull_request) Failing after 44s
830994ab90
update ci
Some checks failed
CI / Format, types, lint, tests (pull_request) Failing after 25s
45cc90f28d
ci xd
Some checks failed
CI / Format, types, lint, tests (pull_request) Failing after 23s
9de5ed1b9b
just push .wasm lmao
All checks were successful
CI / Format, types, lint, tests (pull_request) Successful in 50s
f1a734e101
remove ds_store
All checks were successful
CI / Format, types, lint, tests (pull_request) Successful in 53s
074698f4a6
checkAnnotations dependencies struct and guard on CrocqParser.init()
All checks were successful
CI / Format, types, lint, tests (pull_request) Successful in 1m0s
32d83a7eed
only show parse errors inside crocq_annotation
All checks were successful
CI / Format, types, lint, tests (pull_request) Successful in 59s
0ddcc19ebd
@ -0,0 +37,4 @@
crocqParser: CrocqParser,
diagnosticCollection: vscode.DiagnosticCollection,
annotationStore: AnnotationStore,
): (doc: vscode.TextDocumentChangeEvent) => void {
Owner

Duplicate code, reduce

Duplicate code, reduce
EatOreo marked this conversation as resolved
@ -0,0 +12,4 @@
provideHover(doc, position, _token) {
const hoverResults: vscode.MarkdownString[] = [];
// for debug tree sitter AST vvv
const tree = crocqParser.parse(doc.getText());
Owner

Can we add a debug flag for this

Can we add a debug flag for this
EatOreo marked this conversation as resolved
@ -0,0 +5,4 @@
color: '#6b97ff',
});
// TODO: mock for how we could do highlihting of our annotations
Owner

Create a git issue for this

Create a git issue for this
EatOreo marked this conversation as resolved
add development flag
All checks were successful
CI / Format, types, lint, tests (pull_request) Successful in 51s
63176b7af0
create issues
All checks were successful
CI / Format, types, lint, tests (pull_request) Successful in 48s
526a013358
Use native tree-sitter bindings instead of web-tree-sitter (#7)
All checks were successful
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m24s
Grammar / Corpus and binding tests (pull_request) Successful in 41s
139132cb49
also fixes tests (fixes #4)

Reviewed-on: #7
Co-authored-by: Omid Marfavi <[email protected]>
Co-committed-by: Omid Marfavi <[email protected]>
Make CrocqParser a non-null lazy singleton and remove @ts-expect-error silences
All checks were successful
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m39s
Grammar / Corpus and binding tests (pull_request) Successful in 41s
d80bd41f61
Reduce nesting and remove non-null assertions in checkAnnotations
All checks were successful
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m24s
Grammar / Corpus and binding tests (pull_request) Successful in 45s
3ab058bed5
Remove UNCHECKED launch option
Some checks failed
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m27s
Grammar / Corpus and binding tests (pull_request) Has been cancelled
39b4f47e76
Update README.md
Some checks failed
Extension / Format, types, lint, extension tests (pull_request) Failing after 54s
Grammar / Corpus and binding tests (pull_request) Successful in 38s
25bba12a8d
format md
All checks were successful
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m21s
Grammar / Corpus and binding tests (pull_request) Successful in 37s
4b10939ac6
Add more annotations tests & coverage suite
All checks were successful
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m30s
Grammar / Corpus and binding tests (pull_request) Successful in 39s
276b7f9d69
replace .editorconfig with the one from extension dir
Some checks failed
Grammar / Corpus and binding tests (pull_request) Waiting to run
Extension / Format, types, lint, extension tests (pull_request) Has been cancelled
b606598fe1
replace .gitattributes with the one from extension dir
All checks were successful
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m22s
Grammar / Corpus and binding tests (pull_request) Successful in 42s
0c0320d528
consolidate duplicate .editorconfig and .gitattributes into repo root
All checks were successful
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m34s
Grammar / Corpus and binding tests (pull_request) Successful in 38s
fb4260eed7
marfavi changed title from tree-sitter to Add tree-sitter Crocq grammar 2026-10-02 13:57:32 +02:00
marfavi changed title from Add tree-sitter Crocq grammar to Add tree-sitter Crocq grammar + annotation language features 2026-10-02 13:59:16 +02:00
marfavi scheduled this pull request to auto merge when all checks succeed 2026-10-02 14:17:40 +02:00
marfavi approved these changes 2026-10-02 14:18:58 +02:00
marfavi left a comment

OK

OK
marfavi deleted branch tree-sitter 2026-10-02 14:19:03 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code2rocq/crocq!5
No description provided.