mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 04:10:06 -04:00
chore: query formatting
This commit is contained in:
parent
79975d6557
commit
57a8acf0c4
674 changed files with 18466 additions and 12648 deletions
|
|
@ -1,140 +1,206 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((comment) @injection.language
|
||||
. ; this is to make sure only adjacent comments are accounted for the injections
|
||||
[
|
||||
(string_expression (string_fragment) @injection.content)
|
||||
(indented_string_expression (string_fragment) @injection.content)
|
||||
(string_expression
|
||||
(string_fragment) @injection.content)
|
||||
(indented_string_expression
|
||||
(string_fragment) @injection.content)
|
||||
]
|
||||
(#gsub! @injection.language "/%*%s*([%w%p]+)%s*%*/" "%1")
|
||||
(#set! injection.combined))
|
||||
|
||||
(apply_expression
|
||||
function: (_) @_func
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "regex")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "regex")))
|
||||
]
|
||||
argument:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "regex")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "regex")))
|
||||
]
|
||||
(#match? @_func "(^|\\.)match$")
|
||||
(#set! injection.combined))
|
||||
|
||||
(binding
|
||||
attrpath: (attrpath (identifier) @_path)
|
||||
expression: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "bash")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "bash")))
|
||||
]
|
||||
(#match? @_path "(^\\w+(Phase|Hook)|(pre|post)[A-Z]\\w+|script)$"))
|
||||
attrpath:
|
||||
(attrpath
|
||||
(identifier) @_path)
|
||||
expression:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "bash")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "bash")))
|
||||
]
|
||||
(#match? @_path "(^\\w+(Phase|Hook|Check)|(pre|post)[A-Z]\\w+|script)$"))
|
||||
|
||||
(apply_expression
|
||||
function: (_) @_func
|
||||
argument: (_ (_)* (_ (_)* (binding
|
||||
attrpath: (attrpath (identifier) @_path)
|
||||
expression: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "bash")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "bash")))
|
||||
])))
|
||||
argument:
|
||||
(_
|
||||
(_)*
|
||||
(_
|
||||
(_)*
|
||||
(binding
|
||||
attrpath:
|
||||
(attrpath
|
||||
(identifier) @_path)
|
||||
expression:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "bash")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "bash")))
|
||||
])))
|
||||
(#match? @_func "(^|\\.)writeShellApplication$")
|
||||
(#match? @_path "^text$")
|
||||
(#set! injection.combined))
|
||||
|
||||
(apply_expression
|
||||
function: (apply_expression
|
||||
function: (apply_expression function: (_) @_func))
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "bash")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "bash")))
|
||||
]
|
||||
function:
|
||||
(apply_expression
|
||||
function:
|
||||
(apply_expression
|
||||
function: (_) @_func))
|
||||
argument:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "bash")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "bash")))
|
||||
]
|
||||
(#match? @_func "(^|\\.)runCommand((No)?CC)?(Local)?$")
|
||||
(#set! injection.combined))
|
||||
|
||||
((apply_expression
|
||||
function: (apply_expression function: (_) @_func)
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "bash")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "bash")))
|
||||
])
|
||||
function:
|
||||
(apply_expression
|
||||
function: (_) @_func)
|
||||
argument:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "bash")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "bash")))
|
||||
])
|
||||
(#match? @_func "(^|\\.)write(Bash|Dash|ShellScript)(Bin)?$")
|
||||
(#set! injection.combined))
|
||||
|
||||
((apply_expression
|
||||
function: (apply_expression function: (_) @_func)
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "fish")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "fish")))
|
||||
])
|
||||
function:
|
||||
(apply_expression
|
||||
function: (_) @_func)
|
||||
argument:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "fish")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "fish")))
|
||||
])
|
||||
(#match? @_func "(^|\\.)writeFish(Bin)?$")
|
||||
(#set! injection.combined))
|
||||
|
||||
((apply_expression
|
||||
function: (apply_expression
|
||||
function: (apply_expression function: (_) @_func))
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "haskell")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "haskell")))
|
||||
])
|
||||
function:
|
||||
(apply_expression
|
||||
function:
|
||||
(apply_expression
|
||||
function: (_) @_func))
|
||||
argument:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "haskell")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "haskell")))
|
||||
])
|
||||
(#match? @_func "(^|\\.)writeHaskell(Bin)?$")
|
||||
(#set! injection.combined))
|
||||
|
||||
((apply_expression
|
||||
function: (apply_expression
|
||||
function: (apply_expression function: (_) @_func))
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "javascript")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "javascript")))
|
||||
])
|
||||
function:
|
||||
(apply_expression
|
||||
function:
|
||||
(apply_expression
|
||||
function: (_) @_func))
|
||||
argument:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "javascript")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "javascript")))
|
||||
])
|
||||
(#match? @_func "(^|\\.)writeJS(Bin)?$")
|
||||
(#set! injection.combined))
|
||||
|
||||
((apply_expression
|
||||
function: (apply_expression
|
||||
function: (apply_expression function: (_) @_func))
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "perl")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "perl")))
|
||||
])
|
||||
function:
|
||||
(apply_expression
|
||||
function:
|
||||
(apply_expression
|
||||
function: (_) @_func))
|
||||
argument:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "perl")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "perl")))
|
||||
])
|
||||
(#match? @_func "(^|\\.)writePerl(Bin)?$")
|
||||
(#set! injection.combined))
|
||||
|
||||
((apply_expression
|
||||
function: (apply_expression
|
||||
function: (apply_expression function: (_) @_func))
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "python")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "python")))
|
||||
])
|
||||
function:
|
||||
(apply_expression
|
||||
function:
|
||||
(apply_expression
|
||||
function: (_) @_func))
|
||||
argument:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "python")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "python")))
|
||||
])
|
||||
(#match? @_func "(^|\\.)write(PyPy|Python)[23](Bin)?$")
|
||||
(#set! injection.combined))
|
||||
|
||||
((apply_expression
|
||||
function: (apply_expression
|
||||
function: (apply_expression function: (_) @_func))
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "rust")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content (#set! injection.language "rust")))
|
||||
])
|
||||
function:
|
||||
(apply_expression
|
||||
function:
|
||||
(apply_expression
|
||||
function: (_) @_func))
|
||||
argument:
|
||||
[
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "rust")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "rust")))
|
||||
])
|
||||
(#match? @_func "(^|\\.)writeRust(Bin)?$")
|
||||
(#set! injection.combined))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue