mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat: add requirements parser
This commit is contained in:
parent
d92bfe2cbd
commit
898f9c13d6
5 changed files with 61 additions and 0 deletions
|
|
@ -320,6 +320,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [rasi](https://github.com/Fymyte/tree-sitter-rasi) (maintained by @Fymyte)
|
||||
- [x] [regex](https://github.com/tree-sitter/tree-sitter-regex) (maintained by @theHamsta)
|
||||
- [x] [rego](https://github.com/FallenAngel97/tree-sitter-rego) (maintained by @FallenAngel97)
|
||||
- [x] [pip requirements](https://github.com/ObserverOfTime/tree-sitter-requirements) (maintained by @ObserverOfTime)
|
||||
- [x] [rnoweb](https://github.com/bamonroe/tree-sitter-rnoweb) (maintained by @bamonroe)
|
||||
- [x] [robot](https://github.com/Hubro/tree-sitter-robot) (experimental, maintained by @ema2159)
|
||||
- [x] [ron](https://github.com/amaanq/tree-sitter-ron) (maintained by @amaanq)
|
||||
|
|
|
|||
|
|
@ -440,6 +440,9 @@
|
|||
"rego": {
|
||||
"revision": "b2667c975f07b33be3ceb83bea5cfbad88095866"
|
||||
},
|
||||
"requirements": {
|
||||
"revision": "56ddb4dad2ea0761d20c0995a0de2990caa350b5"
|
||||
},
|
||||
"rnoweb": {
|
||||
"revision": "502c1126dc6777f09af5bef16e72a42f75bd081e"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1310,6 +1310,15 @@ list.rego = {
|
|||
maintainers = { "@FallenAngel97" },
|
||||
}
|
||||
|
||||
list.requirements = {
|
||||
install_info = {
|
||||
url = "https://github.com/ObserverOfTime/tree-sitter-requirements",
|
||||
files = { "src/parser.c" },
|
||||
},
|
||||
maintainers = { "@ObserverOfTime" },
|
||||
readme_name = "pip requirements",
|
||||
}
|
||||
|
||||
list.rnoweb = {
|
||||
install_info = {
|
||||
url = "https://github.com/bamonroe/tree-sitter-rnoweb",
|
||||
|
|
|
|||
47
queries/requirements/highlights.scm
Normal file
47
queries/requirements/highlights.scm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
;; packages
|
||||
|
||||
(package) @variable
|
||||
|
||||
(extras (package) @parameter)
|
||||
|
||||
(path) @text.underline @string.special
|
||||
|
||||
(url) @text.uri
|
||||
|
||||
;; versions
|
||||
|
||||
(version_cmp) @operator
|
||||
|
||||
(version) @number
|
||||
|
||||
;; markers
|
||||
|
||||
(marker_var) @attribute
|
||||
|
||||
(marker_op) @keyword.operator
|
||||
|
||||
;; options
|
||||
|
||||
(option) @function
|
||||
|
||||
"=" @operator
|
||||
|
||||
;; punctuation
|
||||
|
||||
[ "[" "]" "(" ")" ] @punctuation.bracket
|
||||
|
||||
[ "," ";" "@" ] @punctuation.delimiter
|
||||
|
||||
[ "${" "}" ] @punctuation.special
|
||||
|
||||
;; misc
|
||||
|
||||
(env_var) @constant
|
||||
|
||||
(quoted_string) @string
|
||||
|
||||
(linebreak) @character.special
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
(comment) @comment @spell
|
||||
1
queries/requirements/injections.scm
Normal file
1
queries/requirements/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
Loading…
Add table
Add a link
Reference in a new issue