-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: format queries with neovim script
- Loading branch information
1 parent
94f8a6e
commit 33416f7
Showing
4 changed files
with
30 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
[ | ||
(top_section) | ||
(sub_section_1) | ||
(sub_section_2) | ||
(graph_section) | ||
(runtime_section) | ||
(task_section) | ||
(top_section) | ||
(sub_section_1) | ||
(sub_section_2) | ||
(graph_section) | ||
(runtime_section) | ||
(task_section) | ||
] @indent | ||
|
||
[ | ||
(top_section) | ||
(sub_section_1) | ||
(sub_section_2) | ||
(graph_section) | ||
(runtime_section) | ||
(task_section) | ||
(top_section) | ||
(sub_section_1) | ||
(sub_section_2) | ||
(graph_section) | ||
(runtime_section) | ||
(task_section) | ||
] @extend | ||
|
||
; Doesn't work ? | ||
; (unquoted_string | ||
; (string_content) @anchor) @align | ||
|
||
(line_continuation) @indent.always | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
((setting | ||
key: (key) @key (#match? @key "^script$|-script$|^script-") | ||
value: (_ | ||
key: (key) @key | ||
(#match? @key "^script$|-script$|^script-") | ||
value: (_ | ||
(string_content) @injection.content)) | ||
(#set! "injection.language" "bash")) | ||
(#set! "injection.language" "bash")) | ||
|
||
; Requires no spacing around "=" in environment settings for proper highlighting. | ||
; Could be improved if Tree-sitter allowed to specify the target node of the injected | ||
; Could be improved if Tree-sitter allowed to specify the target node of the injected | ||
; language, instead of always using the root node. | ||
; See this proposal: | ||
; https://github.com/tree-sitter/tree-sitter/issues/3625 | ||
((task_section | ||
(sub_section_2 | ||
name: (_) @section_name (#eq? @section_name "environment") | ||
name: (_) @section_name | ||
(#eq? @section_name "environment") | ||
(setting) @injection.content)) | ||
(#set! "injection.language" "bash") | ||
(#set! injection.combined) | ||
(#set! injection.include-children)) | ||
(#set! injection.include-children)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters