aboutsummaryrefslogtreecommitdiffstats
path: root/queries/nix
diff options
context:
space:
mode:
author再生花 <hoangtun0810@gmail.com>2024-02-23 17:42:01 +0900
committerGitHub <noreply@github.com>2024-02-23 10:42:01 +0200
commit31641d72a4c33536e9d5fc8f829d2ba84211af8a (patch)
tree65d4edd50b87eacb993dab1fd27347d6686d3c0e /queries/nix
parentfeat(faust): better highlighting of function calls, built-in variables, and m... (diff)
downloadnvim-treesitter-31641d72a4c33536e9d5fc8f829d2ba84211af8a.tar
nvim-treesitter-31641d72a4c33536e9d5fc8f829d2ba84211af8a.tar.gz
nvim-treesitter-31641d72a4c33536e9d5fc8f829d2ba84211af8a.tar.bz2
nvim-treesitter-31641d72a4c33536e9d5fc8f829d2ba84211af8a.tar.lz
nvim-treesitter-31641d72a4c33536e9d5fc8f829d2ba84211af8a.tar.xz
nvim-treesitter-31641d72a4c33536e9d5fc8f829d2ba84211af8a.tar.zst
nvim-treesitter-31641d72a4c33536e9d5fc8f829d2ba84211af8a.zip
feat(format-scripts): linewrap predicates
"format-ignore".kick()
Diffstat (limited to 'queries/nix')
-rw-r--r--queries/nix/highlights.scm30
1 files changed, 26 insertions, 4 deletions
diff --git a/queries/nix/highlights.scm b/queries/nix/highlights.scm
index 00db10b42..9baf8c4a7 100644
--- a/queries/nix/highlights.scm
+++ b/queries/nix/highlights.scm
@@ -112,18 +112,40 @@
; builtin functions (without builtins prefix)
(variable_expression
name: (identifier) @function.builtin
- ; format-ignore
(#any-of? @function.builtin
; nix eval --impure --expr 'with builtins; filter (x: !(elem x [ "abort" "derivation" "import" "throw" ]) && isFunction builtins.${x}) (attrNames builtins)'
- "add" "addErrorContext" "all" "any" "appendContext" "attrNames" "attrValues" "baseNameOf" "bitAnd" "bitOr" "bitXor" "break" "catAttrs" "ceil" "compareVersions" "concatLists" "concatMap" "concatStringsSep" "deepSeq" "derivationStrict" "dirOf" "div" "elem" "elemAt" "fetchGit" "fetchMercurial" "fetchTarball" "fetchTree" "fetchurl" "filter" "filterSource" "findFile" "floor" "foldl'" "fromJSON" "fromTOML" "functionArgs" "genList" "genericClosure" "getAttr" "getContext" "getEnv" "getFlake" "groupBy" "hasAttr" "hasContext" "hashFile" "hashString" "head" "intersectAttrs" "isAttrs" "isBool" "isFloat" "isFunction" "isInt" "isList" "isNull" "isPath" "isString" "length" "lessThan" "listToAttrs" "map" "mapAttrs" "match" "mul" "parseDrvName" "partition" "path" "pathExists" "placeholder" "readDir" "readFile" "removeAttrs" "replaceStrings" "scopedImport" "seq" "sort" "split" "splitVersion" "storePath" "stringLength" "sub" "substring" "tail" "toFile" "toJSON" "toPath" "toString" "toXML" "trace" "traceVerbose" "tryEval" "typeOf" "unsafeDiscardOutputDependency" "unsafeDiscardStringContext" "unsafeGetAttrPos" "zipAttrsWith"
+ "add" "addErrorContext" "all" "any" "appendContext" "attrNames" "attrValues" "baseNameOf"
+ "bitAnd" "bitOr" "bitXor" "break" "catAttrs" "ceil" "compareVersions" "concatLists" "concatMap"
+ "concatStringsSep" "deepSeq" "derivationStrict" "dirOf" "div" "elem" "elemAt" "fetchGit"
+ "fetchMercurial" "fetchTarball" "fetchTree" "fetchurl" "filter" "filterSource" "findFile"
+ "floor" "foldl'" "fromJSON" "fromTOML" "functionArgs" "genList" "genericClosure" "getAttr"
+ "getContext" "getEnv" "getFlake" "groupBy" "hasAttr" "hasContext" "hashFile" "hashString" "head"
+ "intersectAttrs" "isAttrs" "isBool" "isFloat" "isFunction" "isInt" "isList" "isNull" "isPath"
+ "isString" "length" "lessThan" "listToAttrs" "map" "mapAttrs" "match" "mul" "parseDrvName"
+ "partition" "path" "pathExists" "placeholder" "readDir" "readFile" "removeAttrs"
+ "replaceStrings" "scopedImport" "seq" "sort" "split" "splitVersion" "storePath" "stringLength"
+ "sub" "substring" "tail" "toFile" "toJSON" "toPath" "toString" "toXML" "trace" "traceVerbose"
+ "tryEval" "typeOf" "unsafeDiscardOutputDependency" "unsafeDiscardStringContext"
+ "unsafeGetAttrPos" "zipAttrsWith"
; primops, `__<tab>` in `nix repl`
- "__add" "__filter" "__isFunction" "__split" "__addErrorContext" "__filterSource" "__isInt" "__splitVersion" "__all" "__findFile" "__isList" "__storeDir" "__any" "__floor" "__isPath" "__storePath" "__appendContext" "__foldl'" "__isString" "__stringLength" "__attrNames" "__fromJSON" "__langVersion" "__sub" "__attrValues" "__functionArgs" "__length" "__substring" "__bitAnd" "__genList" "__lessThan" "__tail" "__bitOr" "__genericClosure" "__listToAttrs" "__toFile" "__bitXor" "__getAttr" "__mapAttrs" "__toJSON" "__catAttrs" "__getContext" "__match" "__toPath" "__ceil" "__getEnv" "__mul" "__toXML" "__compareVersions" "__getFlake" "__nixPath" "__trace" "__concatLists" "__groupBy" "__nixVersion" "__traceVerbose" "__concatMap" "__hasAttr" "__parseDrvName" "__tryEval" "__concatStringsSep" "__hasContext" "__partition" "__typeOf" "__currentSystem" "__hashFile" "__path" "__unsafeDiscardOutputDependency" "__currentTime" "__hashString" "__pathExists" "__unsafeDiscardStringContext" "__deepSeq" "__head" "__readDir" "__unsafeGetAttrPos" "__div" "__intersectAttrs" "__readFile" "__zipAttrsWith" "__elem" "__isAttrs" "__replaceStrings" "__elemAt" "__isBool" "__seq" "__fetchurl" "__isFloat" "__sort")
+ "__add" "__filter" "__isFunction" "__split" "__addErrorContext" "__filterSource" "__isInt"
+ "__splitVersion" "__all" "__findFile" "__isList" "__storeDir" "__any" "__floor" "__isPath"
+ "__storePath" "__appendContext" "__foldl'" "__isString" "__stringLength" "__attrNames"
+ "__fromJSON" "__langVersion" "__sub" "__attrValues" "__functionArgs" "__length" "__substring"
+ "__bitAnd" "__genList" "__lessThan" "__tail" "__bitOr" "__genericClosure" "__listToAttrs"
+ "__toFile" "__bitXor" "__getAttr" "__mapAttrs" "__toJSON" "__catAttrs" "__getContext" "__match"
+ "__toPath" "__ceil" "__getEnv" "__mul" "__toXML" "__compareVersions" "__getFlake" "__nixPath"
+ "__trace" "__concatLists" "__groupBy" "__nixVersion" "__traceVerbose" "__concatMap" "__hasAttr"
+ "__parseDrvName" "__tryEval" "__concatStringsSep" "__hasContext" "__partition" "__typeOf"
+ "__currentSystem" "__hashFile" "__path" "__unsafeDiscardOutputDependency" "__currentTime"
+ "__hashString" "__pathExists" "__unsafeDiscardStringContext" "__deepSeq" "__head" "__readDir"
+ "__unsafeGetAttrPos" "__div" "__intersectAttrs" "__readFile" "__zipAttrsWith" "__elem"
+ "__isAttrs" "__replaceStrings" "__elemAt" "__isBool" "__seq" "__fetchurl" "__isFloat" "__sort")
)
; constants
(variable_expression
name: (identifier) @constant.builtin
- ; format-ignore
(#any-of? @constant.builtin
; nix eval --impure --expr 'with builtins; filter (x: !(isFunction builtins.${x} || isBool builtins.${x})) (attrNames builtins)'
"builtins" "currentSystem" "currentTime" "langVersion" "nixPath" "nixVersion" "null" "storeDir"))