mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-08 14:30:05 -04:00
feat: query formatting script
Usage: - nvim -l scripts/format-queries.lua /path/to/file.scm - nvim -l scripts/format-queries.lua /path/to/dir fixup: add `format-ignore` directive to query/highlights.scm
This commit is contained in:
parent
fc0fceb43a
commit
15de22a2e1
2 changed files with 399 additions and 0 deletions
|
|
@ -33,6 +33,9 @@
|
|||
((program . (comment)* . (comment) @keyword.directive)
|
||||
(#lua-match? @keyword.directive "^;+ *extends *$"))
|
||||
|
||||
((comment) @keyword.directive
|
||||
(#lua-match? @keyword.directive "^;+%s*format%-ignore%s*$"))
|
||||
|
||||
((predicate
|
||||
name: (identifier) @_name
|
||||
parameters: (parameters (string "\"" @string "\"" @string) @string.regexp))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue