diff options
author | Indrajith K L | 2022-12-03 17:00:20 +0530 |
---|---|---|
committer | Indrajith K L | 2022-12-03 17:00:20 +0530 |
commit | f5c4671bfbad96bf346bd7e9a21fc4317b4959df (patch) | |
tree | 2764fc62da58f2ba8da7ed341643fc359873142f /helix-22.03-x86_64-windows/runtime/queries/nix | |
download | cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.gz cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.tar.bz2 cli-tools-windows-f5c4671bfbad96bf346bd7e9a21fc4317b4959df.zip |
Diffstat (limited to 'helix-22.03-x86_64-windows/runtime/queries/nix')
-rw-r--r-- | helix-22.03-x86_64-windows/runtime/queries/nix/highlights.scm | 90 | ||||
-rw-r--r-- | helix-22.03-x86_64-windows/runtime/queries/nix/indents.toml | 18 |
2 files changed, 108 insertions, 0 deletions
diff --git a/helix-22.03-x86_64-windows/runtime/queries/nix/highlights.scm b/helix-22.03-x86_64-windows/runtime/queries/nix/highlights.scm new file mode 100644 index 0000000..f668206 --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/nix/highlights.scm @@ -0,0 +1,90 @@ +(comment) @comment + +[ + "if" + "then" + "else" + "let" + "inherit" + "in" + "rec" + "with" + "assert" +] @keyword + +((identifier) @variable.builtin + (#match? @variable.builtin "^(__currentSystem|__currentTime|__nixPath|__nixVersion|__storeDir|builtins)$") + (#is-not? local)) + +((identifier) @function.builtin + (#match? @function.builtin "^(__add|__addErrorContext|__all|__any|__appendContext|__attrNames|__attrValues|__bitAnd|__bitOr|__bitXor|__catAttrs|__compareVersions|__concatLists|__concatMap|__concatStringsSep|__deepSeq|__div|__elem|__elemAt|__fetchurl|__filter|__filterSource|__findFile|__foldl'|__fromJSON|__functionArgs|__genList|__genericClosure|__getAttr|__getContext|__getEnv|__hasAttr|__hasContext|__hashFile|__hashString|__head|__intersectAttrs|__isAttrs|__isBool|__isFloat|__isFunction|__isInt|__isList|__isPath|__isString|__langVersion|__length|__lessThan|__listToAttrs|__mapAttrs|__match|__mul|__parseDrvName|__partition|__path|__pathExists|__readDir|__readFile|__replaceStrings|__seq|__sort|__split|__splitVersion|__storePath|__stringLength|__sub|__substring|__tail|__toFile|__toJSON|__toPath|__toXML|__trace|__tryEval|__typeOf|__unsafeDiscardOutputDependency|__unsafeDiscardStringContext|__unsafeGetAttrPos|__valueSize|abort|baseNameOf|derivation|derivationStrict|dirOf|fetchGit|fetchMercurial|fetchTarball|fromTOML|import|isNull|map|placeholder|removeAttrs|scopedImport|throw|toString)$") + (#is-not? local)) + +[ + (string) + (indented_string) +] @string + +[ + (path) + (hpath) + (spath) +] @string.special.path + +(uri) @string.special.uri + +; boolean +((identifier) @constant.builtin.boolean (#match? @constant.builtin.boolean "^(true|false)$")) @constant.builtin.boolean +; null +((identifier) @constant.builtin (#eq? @constant.builtin "null")) @constant.builtin + +(integer) @constant.numeric.integer +(float) @constant.numeric.float + +(interpolation + "${" @punctuation.special + "}" @punctuation.special) @embedded + +(escape_sequence) @constant.character.escape + +(function + universal: (identifier) @variable.parameter +) + +(formal + name: (identifier) @variable.parameter + "?"? @punctuation.delimiter) + +(app + function: [ + (identifier) @function + (select + attrpath: (attrpath + attr: (attr_identifier) @function .))]) + + +(unary + operator: _ @operator) + +(binary + operator: _ @operator) + +(attr_identifier) @variable.other.member +(inherit attrs: (attrs_inherited (identifier) @variable.other.member) ) + +[ + ";" + "." + "," +] @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +(identifier) @variable diff --git a/helix-22.03-x86_64-windows/runtime/queries/nix/indents.toml b/helix-22.03-x86_64-windows/runtime/queries/nix/indents.toml new file mode 100644 index 0000000..b92ab75 --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/nix/indents.toml @@ -0,0 +1,18 @@ +indent = [ + # "function", + "bind", + "assert", + "with", + "let", + "if", + + "attrset", + "list", + "indented_string", + "parenthesized", +] + +outdent = [ + "}", + "]", +] |