Dump nixos config after scrubing
This commit is contained in:
commit
5fa4c76c24
854 changed files with 30072 additions and 0 deletions
|
|
@ -0,0 +1,177 @@
|
|||
;---Most generic types---
|
||||
(module) @module
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
(concrete_type) @type
|
||||
|
||||
;---annotations----
|
||||
(annotation_type_def
|
||||
(annotation_pre_colon
|
||||
(identifier) @type))
|
||||
|
||||
(annotation_type_def
|
||||
(annotation_pre_colon
|
||||
(identifier) @function)
|
||||
(function_type))
|
||||
|
||||
;----decleration types----
|
||||
(value_declaration
|
||||
(decl_left
|
||||
(identifier_pattern
|
||||
(identifier) @variable.parameter)))
|
||||
|
||||
;---records----
|
||||
(field_name) @variable.member
|
||||
|
||||
(record_field_pattern
|
||||
(_
|
||||
(identifier) @variable))
|
||||
|
||||
;matches the second identifier and all subsequent ones
|
||||
(field_access_expr
|
||||
(identifier) @variable.member)
|
||||
|
||||
;highlight module members as records instead of free variables
|
||||
; avoids highlighting them as out-of-scope vars
|
||||
(variable_expr
|
||||
(module) (identifier) @variable.member)
|
||||
|
||||
;----comments----
|
||||
(line_comment) @comment @spell
|
||||
|
||||
(doc_comment) @comment.documentation @spell
|
||||
|
||||
;-----Punctuation----
|
||||
[
|
||||
"?"
|
||||
(arrow)
|
||||
(fat_arrow)
|
||||
"|"
|
||||
","
|
||||
":"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"{"
|
||||
"}"
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"|"
|
||||
"&"
|
||||
"<-"
|
||||
".."
|
||||
(operator)
|
||||
] @operator
|
||||
|
||||
(wildcard_pattern) @constant.builtin
|
||||
|
||||
[
|
||||
"if"
|
||||
"then"
|
||||
"else"
|
||||
] @keyword.conditional
|
||||
|
||||
[
|
||||
(implements)
|
||||
(when)
|
||||
(is)
|
||||
"as"
|
||||
(to)
|
||||
] @keyword
|
||||
|
||||
;----headers-----
|
||||
|
||||
[
|
||||
"app"
|
||||
"expect"
|
||||
"module"
|
||||
"package"
|
||||
"import"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
(import_as)
|
||||
"imports"
|
||||
] @keyword.import
|
||||
|
||||
|
||||
(value_declaration
|
||||
(decl_left
|
||||
(identifier_pattern
|
||||
(identifier) @function))
|
||||
(expr_body
|
||||
(anon_fun_expr)))
|
||||
|
||||
;----tags----
|
||||
(tags_type
|
||||
(tag_type) @constructor)
|
||||
|
||||
[
|
||||
(tag)
|
||||
(opaque_tag)
|
||||
] @constructor
|
||||
|
||||
;-----builtins----
|
||||
(variable_expr
|
||||
(module) @module
|
||||
(identifier) @boolean
|
||||
(#any-of? @boolean "true" "false")
|
||||
(#eq? @module "Bool"))
|
||||
|
||||
"dbg" @keyword.debug
|
||||
|
||||
;----function invocations ----
|
||||
(function_call_pnc_expr
|
||||
caller: (variable_expr
|
||||
(identifier) @function.call))
|
||||
|
||||
(function_call_pnc_expr
|
||||
caller: (field_access_expr
|
||||
(identifier) @function.call .))
|
||||
|
||||
(bin_op_expr
|
||||
(operator
|
||||
"|>") @operator
|
||||
(variable_expr
|
||||
(identifier) @function))
|
||||
|
||||
;----function arguments----
|
||||
(argument_patterns
|
||||
(identifier_pattern
|
||||
(identifier) @variable.parameter))
|
||||
|
||||
(argument_patterns
|
||||
(_
|
||||
(identifier_pattern
|
||||
(identifier) @variable.parameter)))
|
||||
|
||||
(argument_patterns
|
||||
(_
|
||||
(_
|
||||
(identifier_pattern
|
||||
(identifier) @variable.parameter))))
|
||||
|
||||
;-----consts-----
|
||||
[
|
||||
(int)
|
||||
(uint)
|
||||
(iint)
|
||||
(xint)
|
||||
(natural)
|
||||
] @number
|
||||
|
||||
[
|
||||
(decimal)
|
||||
(float)
|
||||
] @number.float
|
||||
|
||||
(string) @string
|
||||
(multiline_string) @string
|
||||
|
||||
(char) @character
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
; (value_declaration(expr_body(anon_fun_expr)))@indent.ignore
|
||||
[
|
||||
(when_is_expr)
|
||||
(when_is_branch)
|
||||
(record_expr)
|
||||
(anon_fun_expr)
|
||||
(list_expr)
|
||||
(parenthesized_expr)
|
||||
(function_call_pnc_expr)
|
||||
(tuple_expr)
|
||||
(backpassing_expr)
|
||||
(imports)
|
||||
(exposes)
|
||||
(exposes_list)
|
||||
(exposing)
|
||||
;;patterns
|
||||
(record_pattern)
|
||||
(tuple_pattern)
|
||||
(list_pattern)
|
||||
|
||||
;;ability stuff
|
||||
(ability_implementation)
|
||||
(opaque_type_def)
|
||||
;;types
|
||||
(record_type)
|
||||
(tags_type)
|
||||
(record_expr)
|
||||
(implements_implementation)
|
||||
"{"
|
||||
"("
|
||||
"["
|
||||
]
|
||||
@indent.begin
|
||||
|
||||
; ((record_type)
|
||||
; @indent.align
|
||||
; (#set! indent.open_delimiter "{")
|
||||
; (#set! indent.close_delimiter "}"))
|
||||
; ((record_expr)
|
||||
; @indent.align
|
||||
; (#set! indent.open_delimiter "{")
|
||||
; (#set! indent.close_delimiter "}"))
|
||||
; ((tags_type) @indent.align
|
||||
; (#set! indent.open_delimiter "[")
|
||||
; (#set! indent.close_delimiter "]"))
|
||||
; ((implements_implementation) @indent.align
|
||||
; (#set! indent.open_delimiter "[")
|
||||
; (#set! indent.close_delimiter "]"))
|
||||
|
||||
|
||||
(expr_body)@indent.begin
|
||||
|
||||
(ERROR "=")@indent.begin
|
||||
(then )@indent.begin
|
||||
(else)@indent.begin
|
||||
[
|
||||
; result:(_)
|
||||
"]"
|
||||
"}"
|
||||
")"
|
||||
]@indent.branch
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
;injection from function calls
|
||||
(function_call_pnc_expr
|
||||
(variable_expr (identifier) @injection.language)
|
||||
(const [(multiline_string) (string)] @injection.content)
|
||||
(#any-eq? @injection.language
|
||||
"json"
|
||||
"toml"
|
||||
"yaml"
|
||||
"xml"
|
||||
"sql"
|
||||
"lua"
|
||||
"js"
|
||||
"html"
|
||||
"css"
|
||||
"http"
|
||||
"jq"
|
||||
"latex"
|
||||
"md"
|
||||
"nix"
|
||||
"regex"
|
||||
)
|
||||
)
|
||||
;injection from piping function calls
|
||||
(bin_op_expr
|
||||
part: (const
|
||||
[(multiline_string) (string)] @injection.content
|
||||
)
|
||||
part: (operator)
|
||||
part: (variable_expr
|
||||
(identifier) @injection.language
|
||||
)
|
||||
(#any-eq? @injection.language
|
||||
"json"
|
||||
"toml"
|
||||
"yaml"
|
||||
"xml"
|
||||
"sql"
|
||||
"lua"
|
||||
"js"
|
||||
"html"
|
||||
"css"
|
||||
"http"
|
||||
"jq"
|
||||
"latex"
|
||||
"md"
|
||||
"nix"
|
||||
"regex"
|
||||
)
|
||||
)
|
||||
|
||||
(
|
||||
[
|
||||
(line_comment)
|
||||
(doc_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment")
|
||||
)
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
(expr_body) @local.scope
|
||||
|
||||
(argument_patterns
|
||||
(identifier_pattern
|
||||
(identifier) @local.definition))
|
||||
|
||||
; (argument_patterns(long_identifier)@local.definition)
|
||||
(exposes_list
|
||||
(identifier) @local.reference)
|
||||
|
||||
(import_expr(as)(module)@local.definition)
|
||||
|
||||
(opaque_type_def
|
||||
(apply_type
|
||||
(concrete_type) @local.definition.type))
|
||||
|
||||
(alias_type_def
|
||||
(apply_type
|
||||
(concrete_type) @local.definition.type))
|
||||
|
||||
(value_declaration
|
||||
(decl_left
|
||||
(identifier_pattern
|
||||
(identifier) @local.definition.function))
|
||||
(expr_body
|
||||
(anon_fun_expr)))
|
||||
|
||||
(value_declaration
|
||||
(decl_left
|
||||
(identifier_pattern
|
||||
(identifier) @local.definition.var)))
|
||||
|
||||
(identifier_pattern
|
||||
(identifier) @local.definition)
|
||||
|
||||
(when_is_branch pattern: (_ (identifier_pattern (identifier) @local.definition)))
|
||||
(spread_pattern (identifier) @local.definition)
|
||||
|
||||
(identifier) @local.reference
|
||||
|
||||
(tag_expr
|
||||
(tag)) @local.reference
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
(anon_fun_expr
|
||||
(expr_body) @function.inner
|
||||
) @function.outer
|
||||
|
||||
(argument_patterns
|
||||
((_) @parameter.inner . ","? @parameter.outer) @parameter.outer
|
||||
)
|
||||
|
||||
(function_type
|
||||
((_) @parameter.inner . ","? @parameter.outer) @parameter.outer(#not-eq? @parameter.inner "->")
|
||||
)
|
||||
|
||||
(function_pnc_expr
|
||||
.
|
||||
(_)
|
||||
(parenthesized_expr (expr_body) @parameter.inner) @parameter.outer
|
||||
)
|
||||
|
||||
(function_pnc_expr
|
||||
.
|
||||
(_) ((_) @parameter.inner) @parameter.outer
|
||||
)
|
||||
|
||||
[
|
||||
(annotation_type_def ) @class.inner
|
||||
(alias_type_def ) @class.inner
|
||||
(opaque_type_def ) @class.inner
|
||||
] @class.outer
|
||||
|
||||
(apply_type_arg) @parameter.inner
|
||||
|
||||
(line_comment) @comment.outer
|
||||
(doc_comment) @comment.outer
|
||||
Loading…
Add table
Add a link
Reference in a new issue