mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
feat: add awk injection in bash
This commit is contained in:
parent
ec03481377
commit
86f8fbf8d7
1 changed files with 24 additions and 0 deletions
|
|
@ -88,3 +88,27 @@
|
||||||
(#offset! @injection.content 0 1 0 -1)
|
(#offset! @injection.content 0 1 0 -1)
|
||||||
(#set! injection.include-children)
|
(#set! injection.include-children)
|
||||||
(#set! injection.self))
|
(#set! injection.self))
|
||||||
|
|
||||||
|
(command
|
||||||
|
name: (command_name
|
||||||
|
(word) @_command)
|
||||||
|
.
|
||||||
|
argument: (raw_string) @injection.content
|
||||||
|
.
|
||||||
|
(#eq? @_command "awk")
|
||||||
|
(#offset! @injection.content 0 1 0 -1)
|
||||||
|
(#set! injection.include-children)
|
||||||
|
(#set! injection.language "awk"))
|
||||||
|
|
||||||
|
(command
|
||||||
|
name: (command_name
|
||||||
|
(word) @_command)
|
||||||
|
argument: (_)? @_param
|
||||||
|
.
|
||||||
|
argument: (raw_string) @injection.content
|
||||||
|
.
|
||||||
|
(#eq? @_command "awk")
|
||||||
|
(#not-match? @_param "^(--file|--field-separator|-[^-]*[fF])")
|
||||||
|
(#offset! @injection.content 0 1 0 -1)
|
||||||
|
(#set! injection.include-children)
|
||||||
|
(#set! injection.language "awk"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue