nvim-treesitter/runtime/queries/foam/injections.scm

24 lines
669 B
Scheme
Raw Normal View History

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