mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
commit
90ec2d5250
3 changed files with 37 additions and 0 deletions
|
|
@ -180,6 +180,7 @@ List of currently supported languages:
|
|||
- [ ] yaml
|
||||
- [ ] nix
|
||||
- [ ] markdown
|
||||
- [x] regex (maintained by @theHamsta)
|
||||
|
||||
## Troubleshooting
|
||||
Before doing anything run `:checkhealth nvim_treesitter`. This will help you find where the bug might come from.
|
||||
|
|
|
|||
|
|
@ -203,6 +203,13 @@ parsers.nix = {
|
|||
}
|
||||
}
|
||||
|
||||
parsers.regex = {
|
||||
install_info = {
|
||||
url = "https://github.com/tree-sitter/tree-sitter-regex",
|
||||
files = { "src/parser.c" }
|
||||
}
|
||||
}
|
||||
|
||||
-- @enable can be true or false
|
||||
-- @disable is a list of languages, only relevant if enable is true
|
||||
-- @keymaps list of user mappings for a given module if relevant
|
||||
|
|
|
|||
29
queries/regex/highlights.scm
Normal file
29
queries/regex/highlights.scm
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
;; Forked from tree-sitter-regex
|
||||
;; The MIT License (MIT) Copyright (c) 2014 Max Brunsfeld
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"(?"
|
||||
"(?:"
|
||||
"(?<"
|
||||
">"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
(group_name) @property
|
||||
|
||||
[
|
||||
(identity_escape)
|
||||
(control_letter_escape)
|
||||
(character_class_escape)
|
||||
(control_escape)
|
||||
(start_assertion)
|
||||
(end_assertion)
|
||||
(boundary_assertion)
|
||||
(non_boundary_assertion)
|
||||
] @escape
|
||||
|
||||
[ "*" "+" "|" "=" "<=" "!" "<!" ] @operator
|
||||
Loading…
Add table
Add a link
Reference in a new issue