Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
| typescript | ✓ | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
| typespec | ✓ | ✓ | ✓ | | | `tsp-server` |
| typst | ✓ | | | ✓ | | `tinymist` |
| umka | ✓ | | | | | |
| ungrammar | ✓ | | | | | |
| unison | ✓ | ✓ | ✓ | ✓ | ✓ | |
| uxntal | ✓ | | | | | |
Expand Down
12 changes: 12 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5145,3 +5145,15 @@ injection-regex = "^chuck$|^ck$"
[[grammar]]
name = "chuck"
source = { git = "https://github.com/tymbalodeon/tree-sitter-chuck", rev = "2fd18bcd48e7b23ee47f854e639020df90b1270b" }

[[language]]
name = "umka"
scope = "source.umka"
injection-regex = "umka"
file-types = ["um"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }

[[grammar]]
name = "umka"
source = { git = "https://github.com/thacuber2a03/tree-sitter-umka", rev = "f2588765c45d7f5099d53cf34b46883f31407ff2"}
53 changes: 53 additions & 0 deletions runtime/queries/umka/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

["case" "const" "default" "enum" "fn" "map" "import" "interface" "return" "struct" "switch" "type" "var" "weak" "in"] @keyword

["if" "for"] @keyword.conditional

["append" "atan" "atan2" "cap" "ceil" "copy" "cos" "delete"
"exit" "exp" "fabs" "fiberalive" "fibercall" "fiberspawn"
"floor" "fprintf" "fscanf" "insert" "keys" "len" "log" "make"
"memusage" "new" "printf" "round" "scanf" "selfhasptr"
"selftypeeq" "sin" "sizeof" "sizeofself" "slice" "sprintf"
"sqrt" "sscanf" "trunc" "typeptr" "valid" "validkey"] @support.function @function.builtin

["=" ":=" "*" ":" "," "::" "." ";" "++" "--"] @operator

(closureLiteral "|" @keyword)

(methodDecl
receiver: (rcvSignature name: (ident) @variable.parameter)
name: (ident) @function.method)

(fnDecl name: (ident) @function)

(functionCall name: (qualIdent name: (ident) @function))
(functionCall name: (qualIdent name: (ident) @type.builtin) (#match? @type.builtin "^((str|void|int8|int16|int32|int|uint8|uint16|uint32|uint|bool|char|real32|real|fiber|any)$|[_]*[A-Z])"))
(functionCall name: (qualIdent name: (ident) @type) (#match? @type "^([_]*[A-Z])"))

(parameterList params: (typedIdentList
(identList (ident) @variable.parameter)))

(structType (typedIdentList
(identList (ident) @property)))

(constDeclItem name: (ident) @constant)
(enumItem) @constant
(enumLiteral name: (ident) @constant)
(stringLiteral) @string
(stringFmtLiteral) @string
(stringImportLiteral) @string
(escSeq) @string.special
(fmtSeq) @string.special
(comment) @comment
(importItem name: (ident) @module)
(typeDeclItem name: (ident) @type)
(type (qualIdent name: (ident) @type))
(qualIdent module: (ident) @module)
(modSeq name: (ident) @module)
((type) @type.builtin
(#match? @type.builtin "^(str|void|int8|int16|int32|int|uint8|uint16|uint32|uint|bool|char|real32|real|fiber|any)$"))

((ident) @constant.builtin
(#match? @constant.builtin "^(true|false|null)$"))

[ (decNumber) (hexNumber) (realNumber) ] @number