Skip to content

Instantly share code, notes, and snippets.

@bibijeebi
Created October 28, 2024 19:40
Show Gist options
  • Select an option

  • Save bibijeebi/cb84102cd197e63a7d7a8d28f117e6ca to your computer and use it in GitHub Desktop.

Select an option

Save bibijeebi/cb84102cd197e63a7d7a8d28f117e6ca to your computer and use it in GitHub Desktop.
diff --git a/syntaxes/org.tmLanguage.json b/syntaxes/org.tmLanguage.json
index ee1ee88..d63a46d 100755
--- a/syntaxes/org.tmLanguage.json
+++ b/syntaxes/org.tmLanguage.json
@@ -1309,6 +1309,39 @@
}
]
},
+ {
+ "name": "meta.block.source.nix.org",
+ "begin": "(?i)(?:^|\\G)(?:\\s*)(#\\+BEGIN_SRC)\\s+(nix)\\b\\s*(.*)$",
+ "end": "(?i)(?:^|\\G)(?:\\s*)(#\\+END_SRC)\\s*$",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.block.org"
+ },
+ "2": {
+ "name": "constant.other.language.org"
+ },
+ "3": {
+ "name": "string.other.header-args.org"
+ }
+ },
+ "endCaptures": {
+ "1": {
+ "name": "keyword.control.block.org"
+ }
+ },
+ "patterns": [
+ {
+ "begin": "(^|\\G)(\\s*)(.*)",
+ "while": "(?i)(^|\\G)(?!\\s*#\\+END_SRC\\s*)",
+ "contentName": "meta.embedded.block.nix",
+ "patterns": [
+ {
+ "include": "source.nix"
+ }
+ ]
+ }
+ ]
+ },
{
"name": "meta.block.source.yaml.org",
"begin": "(?i)(?:^|\\G)(?:\\s*)(#\\+BEGIN_SRC)\\s+(yaml|yml)\\b\\s*(.*)$",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment