mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 04:40:08 -04:00
feat(injections): add printf format strings
This commit is contained in:
parent
2160b26453
commit
947c43052c
14 changed files with 184 additions and 20 deletions
|
|
@ -112,24 +112,4 @@
|
|||
. ">" @punctuation.bracket)))
|
||||
[ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket
|
||||
|
||||
;; Only highlight format specifiers in calls to string.format
|
||||
;; string.format('...')
|
||||
;(function_call
|
||||
; called_object: (index
|
||||
; (identifier) @base
|
||||
; key: (identifier) @entry)
|
||||
; arguments: (arguments .
|
||||
; (string (format_specifier) @string.escape))
|
||||
;
|
||||
; (#eq? @base "string")
|
||||
; (#eq? @entry "format"))
|
||||
|
||||
;; ('...'):format()
|
||||
;(function_call
|
||||
; called_object: (method_index
|
||||
; (string (format_specifier) @string.escape)
|
||||
; key: (identifier) @func-name)
|
||||
; (#eq? @func-name "format"))
|
||||
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue