nvim-treesitter/queries/foam/injections.scm

21 lines
606 B
Scheme
Raw Normal View History

2021-12-14 13:45:56 +01:00
;; Pass code blocks to Cpp highlighter
(code
(code_body) @injection.content
(#set! injection.language "cpp"))
2021-12-14 13:45:56 +01:00
;; Pass identifiers to Go highlighter (Cheating I know)
;; ((identifier) @injection.content
;; (#set! injection.language "lua")
2021-12-14 13:45:56 +01:00
;; Highlight regex syntax inside literal strings
((string_literal) @injection.content
(#set! injection.language "regex"))
2021-12-14 13:45:56 +01:00
;; Highlight PyFoam syntax as Python statements
(pyfoam_variable
code_body: (_) @injection.content
(#set! injection.language "python"))
(pyfoam_expression
code_body: (_) @injection.content
(#set! injection.language "python"))