mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -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
|
|
@ -34,3 +34,11 @@
|
|||
(value_arguments
|
||||
(value_argument
|
||||
(string_literal) @injection.content (#set! injection.language "regex")))))
|
||||
|
||||
; "pi = %.2f".format(3.14159)
|
||||
((call_expression
|
||||
(navigation_expression
|
||||
(string_literal) @injection.content
|
||||
(navigation_suffix (simple_identifier) @_method)))
|
||||
(#eq? @_method "format")
|
||||
(#set! injection.language "printf"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue