diff options
author | Michael Davis | 2022-01-06 15:00:00 +0000 |
---|---|---|
committer | GitHub | 2022-01-06 15:00:00 +0000 |
commit | a8fd33ac012a79069ef1409503a2edcf3a585153 (patch) | |
tree | 879db9e3f4d97e1d4199af63b780e1e3d92f027c /runtime/queries/elixir/injections.scm | |
parent | 2e02a1d6bc004212033b9c4e5ed0de0fd880796c (diff) |
add tree-sitter-regex (#1362)
* add tree-sitter-regex
* adapt regex highlights from upstream
* inject regex into elixir sigil_r/2 and sigil_R/2
* generate lang-support docs
* capture interesting nodes in character-ranges
* make $.character_class captures more consistent
* fix fallthrough behavior for character classes
* capture pattern characters as 'string'
* use latest tree-sitter-regex
* set elixir regex injections as combined
* add link to upstream queries
* inject regex in rust into 'Regex::new' raw string literals
Diffstat (limited to 'runtime/queries/elixir/injections.scm')
-rw-r--r-- | runtime/queries/elixir/injections.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/queries/elixir/injections.scm b/runtime/queries/elixir/injections.scm index 321c90ad..8370a0d8 100644 --- a/runtime/queries/elixir/injections.scm +++ b/runtime/queries/elixir/injections.scm @@ -1,2 +1,9 @@ ((comment) @injection.content (#set! injection.language "comment")) + +((sigil + (sigil_name) @_sigil_name + (quoted_content) @injection.content) + (#match? @_sigil_name "^(r|R)$") + (#set! injection.language "regex") + (#set! injection.combined)) |