Bruno BELANYI
900960d7d9
Add indentation queries for multi-value 'select'
...
ci/woodpecker/push/check Pipeline failed
Unfortunately, the indentation feature is still a work in progress, so
we have some expected failures in our tests...
2024-05-07 12:52:27 +00:00
Bruno BELANYI
6b2ecc78ac
Test more 'select' related indentation cases
ci/woodpecker/push/check Pipeline was successful
2024-04-25 11:27:43 +00:00
Bruno BELANYI
626ffea712
Add queries to Rust bindings
ci/woodpecker/push/check Pipeline was successful
2024-04-23 15:52:56 +00:00
Bruno BELANYI
6918efba46
Add queries to 'package.json'
2024-04-23 15:52:56 +00:00
Bruno BELANYI
d5654de519
Expose 'condition' node
2024-04-23 15:47:30 +00:00
Bruno BELANYI
f267a5be95
Add multi-valued select
expression
2024-04-23 15:43:10 +00:00
Bruno BELANYI
96ae542119
Name 'commaSeparated*' helpers consistently
2024-04-23 15:27:52 +00:00
Bruno BELANYI
8166742493
Remove trailing commas in 'select_value' arguments
2024-04-23 15:23:06 +00:00
Bruno BELANYI
7d8f958a90
Add boolean-typed select values
2024-04-23 15:14:16 +00:00
Bruno BELANYI
3bc77aab19
Remove 'selection_type' alias
2024-04-23 15:13:53 +00:00
Bruno BELANYI
734f4452dd
Rename fields in 'select_value'
...
This aligns with upstream, and makes more sense given their usage.
2024-04-23 15:12:55 +00:00
Bruno BELANYI
c56e2eca70
Simplify 'select_value' rule
...
Upstream has greatly simplified the parsing of `select` expressions, in
order to add multi-valued `select`.
To this end, we remove the hard-coded list of function names, and accept
an arbitrary number of arguments.
2024-04-23 15:11:00 +00:00
Bruno BELANYI
b2e113a821
Relax ordering in 'select' cases
...
We shouldn't really care whether or not `default` *is* the last value...
2024-04-23 14:38:32 +00:00
Bruno BELANYI
93a71d095b
Add more generated files attributes
ci/woodpecker/push/check Pipeline was successful
2024-04-22 09:54:16 +00:00
Bruno BELANYI
bc4db561ca
Bump flake inputs
...
ci/woodpecker/push/check Pipeline was successful
This means regenerating all the tree-sitter files, and adding newly
generated outputs (mostly new bindings).
The `--apply-all-captures` flag has been removed, it is now the default
(and only) matching behaviour.
2024-04-22 09:49:18 +00:00
Bruno BELANYI
b04cd92189
Add locals queries
...
ci/woodpecker/push/check Pipeline was successful
Once again, treating module as function calls, since that's basically
what they are...
2024-04-14 13:00:17 +01:00
Bruno BELANYI
6d6d9fc03b
Add test for multiple arguments in selection type
2024-04-14 13:00:17 +01:00
Bruno BELANYI
6ece5d984a
Release 0.3.0
ci/woodpecker/push/check Pipeline was successful
2024-04-13 18:27:56 +01:00
Bruno BELANYI
e6a2757c51
Alias 'default_case' to 'select_case'
...
There's not much use in the node being a different name.
2024-04-13 18:23:06 +01:00
Bruno BELANYI
8db7b053f5
Add 'default' alias
...
This makes it appear in the tree as a named node.
2024-04-13 18:21:58 +01:00
Bruno BELANYI
d297f38e6a
Fix typos in indentation test runner
ci/woodpecker/push/check Pipeline was successful
2024-04-13 18:17:22 +01:00
Bruno BELANYI
cc84a43055
Release 0.2.0
ci/woodpecker/push/check Pipeline was successful
2024-04-13 17:11:41 +01:00
Bruno BELANYI
0ca28eb2e9
Add indentation tests
2024-04-13 17:07:43 +01:00
Bruno BELANYI
f8f328fa17
Add indentation queries
2024-04-13 17:07:37 +01:00
Bruno BELANYI
9ee889d7ad
Make 'punctuation' highlight test more exhaustive
2024-04-13 17:07:29 +01:00
Bruno BELANYI
9889191245
Fix indentation in test files
2024-04-13 17:07:23 +01:00
Bruno BELANYI
6bd28f2b6b
Add NeoVim test runner
...
For the queries that can't be tested with `tree-sitter` itself.
2024-04-13 17:07:16 +01:00
Bruno BELANYI
9e9fde6c77
Add 'comment' injection
2024-04-13 16:01:26 +01:00
Bruno BELANYI
615bb266cc
Add folding query
2024-04-13 16:01:26 +01:00
Bruno BELANYI
9457caf3a2
Fix typo in a comment
2024-04-11 18:44:13 +01:00
Bruno BELANYI
adec624d74
Tweak comment parsing
...
This is taken verbatim from tree-sitter-c [1], just in case :-).
[1]: https://github.com/tree-sitter/tree-sitter-c
2024-04-11 18:38:14 +01:00
Bruno BELANYI
b62fc19da9
Make comments a single node in the grammar
...
This looks to be a *strong* idiom in tree-sitter parsers.
2024-04-11 18:36:20 +01:00
Bruno BELANYI
aa8472e73f
Add test for literals
2024-04-11 18:08:40 +01:00
Bruno BELANYI
508ea00920
Add missing 'PHONY' target
2024-04-11 18:01:32 +01:00
Bruno BELANYI
dc1d139d35
Fix 'PHONY' target name
2024-04-11 18:00:12 +01:00
Bruno BELANYI
ebb642cb14
Rename to 'tree-sitter-bp'
...
ci/woodpecker/push/check Pipeline was successful
This is really just to simplify my life and align with the Vim/NeoVim
filetype name.
2024-04-10 15:32:37 +00:00
Bruno BELANYI
f6e1266493
Consider module as function call for highlighting
...
ci/woodpecker/push/check Pipeline was successful
Their semantic is closer to a function call (like i.e: Bazel rules)
rather than a module/namespace.
Similarly for their properties, which are more like parameters than
members.
2024-04-10 15:21:07 +00:00
Bruno BELANYI
be1e3f07d3
Make 'line_comment' more explicit about newlines
...
Because of the way regular expressions work, they were already bounded
at newlines here, but explicit is better than implicit :-).
2024-04-10 15:20:29 +00:00
Bruno BELANYI
73b0797891
Add builtins highlighting
2024-04-10 15:20:29 +00:00
Bruno BELANYI
3475d713d5
Add 'select' highlighting
2024-04-09 12:28:28 +01:00
Bruno BELANYI
ddb4f693be
Add test for 'select' as an identifier
2024-04-09 12:28:28 +01:00
Bruno BELANYI
ab6d235540
Add map properties highlighting
2024-04-09 12:28:28 +01:00
Bruno BELANYI
42bef1d592
Add punctuations highlighting
2024-04-09 12:28:28 +01:00
Bruno BELANYI
a9ec312792
Add modules highlighting
...
Still debating whether modules should be highlighted as namespaces or as
function calls.
2024-04-09 12:28:28 +01:00
Bruno BELANYI
3e4879a593
Add 'type' field to new-style module
...
I'd forgotten it...
2024-04-09 12:28:28 +01:00
Bruno BELANYI
d4d88a6f01
Use nvim semantics in tests
...
To be more explicit: this makes it so the behaviour is "last-defined,
innermost capture wins".
2024-04-09 12:28:28 +01:00
Bruno BELANYI
7d6dce936a
Account for '-' as an operator
...
For syntax purposes it's part of the number, but it looks better when
highlighted as an operator.
2024-04-09 12:28:28 +01:00
Bruno BELANYI
91e6f7841c
Add operators highlighting
2024-04-09 12:28:28 +01:00
Bruno BELANYI
69e7f36f75
Add variables highlighting
2024-04-09 12:28:28 +01:00
Bruno BELANYI
b9fd34c084
Add literals highlighting
2024-04-08 20:48:15 +01:00