mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 01:40:02 -04:00
feat: add requirements parser
This commit is contained in:
parent
d92bfe2cbd
commit
898f9c13d6
5 changed files with 61 additions and 0 deletions
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