Commit Graph

84 Commits

Author SHA1 Message Date
Maurício Szabo
a797f2cda5
Fixed possible bug on extname
Co-authored-by: Andrew Dupont <github@andrewdupont.net>
2024-06-07 11:03:07 -03:00
Maurício Szabo
9e70a723c7 Fixed tags 2024-04-30 19:06:11 -03:00
Maurício Szabo
781060e01b Adding a tags query 2024-04-30 15:35:52 -03:00
Maurício Szabo
bd5d1f69ae Fixed Javascript injections for Clojure 2024-04-30 12:32:47 -03:00
Maurício Szabo
10c6eb0b0c Adding Jank as an extension 2024-04-30 12:32:30 -03:00
Maurício Szabo
754dcf2cc3 Removed test for Jank 2024-04-30 12:31:31 -03:00
Maurício Szabo
c7d3a00bce Removed Jank injection (they changed the API) 2024-04-30 12:14:05 -03:00
Maurício Szabo
a2a6d3e67e Merge remote-tracking branch 'origin/master' into clojure-grammar-enhancements 2024-04-30 11:10:27 -03:00
confused-Techie
9f0e8a2c8a Stop detecting .org files as language-clojure 2024-04-17 19:29:57 -07:00
Maurício Szabo
9bb403eb9a Fixes a possible performance issue 2024-04-11 22:00:13 -03:00
Maurício Szabo
1027a51811 Merge remote-tracking branch 'origin/master' into clojure-grammar-enhancements 2024-04-11 21:53:18 -03:00
Andrew Dupont
b9ee65f6a3 Add extensive comment delimiter metadata to most built-in grammars 2024-04-06 13:00:55 -07:00
Maurício Szabo
444e400e90 Fixes on Clojure extension types 2024-02-17 22:20:51 -03:00
Andrew Dupont
76ac2cf81c Make useExperimentalModernTreeSitter the default…
…and create `useLegacyTreeSitter` for those who want to opt into the previous default behavior.

(Legacy Tree-sitter grammars will soon be removed, but this is a step toward that future!)
2024-01-07 15:35:07 -08:00
Andrew Dupont
6cae381cc7 [tree-sitter] Fix Clojure tests 2023-12-15 19:09:53 -08:00
Maurício Szabo
09ee95b986 Fixed injection issue 2023-09-21 18:07:33 -03:00
Maurício Szabo
d28f28dd9c Final rule for js* and native/raw macros 2023-09-21 18:02:09 -03:00
Maurício Szabo
24b3f91b6d Removed duplicated queries 2023-09-21 15:04:03 -03:00
Maurício Szabo
0581a52dd5 Another test just to be sure 2023-09-21 01:04:09 -03:00
Maurício Szabo
98e8867470 Removed unused scope for Clojure 2023-09-21 01:00:29 -03:00
Maurício Szabo
f4e78467a7 Simplifying queries for Clojure 2023-09-21 00:54:48 -03:00
Maurício Szabo
82f7dc2af8 EDN fix for str_lit 2023-09-21 00:51:08 -03:00
Maurício Szabo
19d69237b4 Passing buffer to injections to customize even more 2023-09-21 00:48:40 -03:00
Maurício Szabo
73f2756058 EDN will be back to Clojure - less issues 2023-09-21 00:48:10 -03:00
Maurício Szabo
68dc3deb54 Added a tokens fixture for EDN 2023-09-21 00:47:52 -03:00
Maurício Szabo
cf896ec224 Add a tokenizer test for EDN files 2023-09-21 00:47:36 -03:00
Maurício Szabo
1a7719adad Fixed some grammar rules for unquote in Clojure 2023-09-20 21:38:03 -03:00
Maurício Szabo
d5664d19c0 Implementing a new scope detector, fix Clojure grammar 2023-09-18 02:38:35 -03:00
Maurício Szabo
eab578996f Adding metadata and fixing some syntax quoting 2023-08-04 19:51:31 -03:00
Maurício Szabo
0506e951d2 Metadata highlight for Clojure 2023-08-04 15:52:31 -03:00
Maurício Szabo
1adeea69e3 fixing some "core" Clojure forms 2023-08-04 13:42:30 -03:00
Maurício Szabo
4cc48b6723 Fixes for dismiss tag with syntax quote 2023-08-04 13:28:17 -03:00
Maurício Szabo
90b69644c9 Fixed Clojure's non-word chars 2023-08-04 12:55:05 -03:00
Andrew Dupont
099d5b8671
Merge pull request #652 from savetheclocktower/tree-sitter-query-refactor
[modern-tree-sitter] Overhaul Tree-sitter scope tests
2023-07-22 19:40:36 -07:00
Andrew Dupont
c8cbd82518 Overhaul Tree-sitter scope tests
I realized a few days ago that the `#is?` and `#is-not?` predicates — which
puzzled me upon first investigation back in February, and which I'd ignored ever
since — are exactly what I should've been using all along for scope tests.

They are counterparts to `#set!` in that they are two additional buckets in
which to store arbitrary data. And they remove the need to have both
`test.onlyIfFoo` and `test.onlyIfNotFoo`, since the presence of `test.onlyIfFoo`
in the `refutedProperties` bucket can behave opposite to the its presence in the
`assertedProperties` bucket.

This further means that a test called `test.onlyIfFoo` can be renamed
`test.foo`. The `onlyIf` was my way of making it clear through context that this
`#set!` predicate actually enforced a criterion — but that's implicit now that
it'll be using an `#is?` or `#is-not?` predicate.

I also took the opportunity to move `test.final` and `test.shy` to their own
namespace. `final` is an oddball in the sense that it sets criteria for _other_
captures as well as its own, and they're both oddballs in the sense that they
consider the effects of other captures on the same range. And I don't want to
introduce the idea that a predicate like `#is?` can have side effects.

So they stay on `#set!` and live at `capture.final` and `capture.shy`,
respectively.

To summarize, here's a before and after:

  ((string "\"" @punctuation.start)
    (#set! test.onlyIfFirst true)
    (#set! test.final true)

  ((bar) @baz
    (#set! test.onlyIfNotDescendantOfType thud))

becomes

  ((string "\"" @punctuation.start)
    (#is? test.first true)
    (#set! capture.final true)

  ((bar) @baz
    (#is-not? test.descendantOfType thud))

This PR changes all the built-in grammars. I don't know if there are any
third-party modern-Tree-sitter grammars out there except for mine, but I've
added a simple compatibility layer so that all of the old predicates should
still work for now. But I'm going to remove that code before we ship this stuff
for real.
2023-07-20 15:17:01 -07:00
confused-Techie
c66487b7df Decaf language-clojure 2023-07-08 18:01:27 -07:00
confused-Techie
a7d07ab72c Add some languages
* language-c
* language-clojure
* language-coffee-script
* language-csharp
* language-css
* language-gfm
* language-git
* language-go
2023-07-08 17:50:50 -07:00
Maurício Szabo
5b7b38d97d Removed empty file for Clojure indents 2023-06-09 23:30:39 -03:00
Maurício Szabo
72d40e93e6 Removed unused queries 2023-06-09 23:29:39 -03:00
Maurício Szabo
674ffef8ef Fixes on "comment block" for Clojure grammar 2023-06-02 18:57:59 -03:00
Maurício Szabo
ee68e953e0 Forcing TextMate grammar 2023-05-29 20:32:04 -03:00
Maurício Szabo
4b20545c2d Removed ignore file 2023-05-22 20:45:11 -03:00
Maurício Szabo
88209f1096 Removed old CLJ test 2023-05-22 20:44:34 -03:00
Maurício Szabo
3e4bea0109 Fixing some elements on the EDN grammar 2023-05-22 20:31:07 -03:00
Maurício Szabo
155b675953 Re-adding textmate tests 2023-05-22 20:30:45 -03:00
Maurício Szabo
7eb6ca45d1 Removed TextMate tests 2023-05-22 20:27:40 -03:00
Maurício Szabo
89728452f8 Adding more tests for config toggles 2023-05-22 20:27:20 -03:00
Maurício Szabo
4ebbca4b5d Testing quoting, comments, and deprecation 2023-05-22 20:17:24 -03:00
Maurício Szabo
001bf57bdf Some comments and fixes 2023-05-22 20:16:36 -03:00
Maurício Szabo
354f63c590 Fixed syntaxes for Regexp and other elements 2023-05-22 16:28:44 -03:00