2021-12-14 13:45:56 +01:00
|
|
|
;; Pass code blocks to Cpp highlighter
|
2023-05-03 19:07:59 +09:00
|
|
|
(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)
|
2023-05-03 19:07:59 +09:00
|
|
|
;; ((identifier) @injection.content
|
|
|
|
|
;; (#set! injection.language "lua")
|
2021-12-14 13:45:56 +01:00
|
|
|
|
|
|
|
|
;; Highlight regex syntax inside literal strings
|
2023-05-03 19:07:59 +09:00
|
|
|
((string_literal) @injection.content
|
|
|
|
|
(#set! injection.language "regex"))
|
2021-12-14 13:45:56 +01:00
|
|
|
|
2022-01-16 18:44:33 +01:00
|
|
|
;; Highlight PyFoam syntax as Python statements
|
2023-05-03 19:07:59 +09:00
|
|
|
(pyfoam_variable
|
|
|
|
|
code_body: (_) @injection.content
|
|
|
|
|
(#set! injection.language "python"))
|
|
|
|
|
(pyfoam_expression
|
|
|
|
|
code_body: (_) @injection.content
|
|
|
|
|
(#set! injection.language "python"))
|