plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
900c685
— Peter John
2026-09-08T13:24:28+05:30
docs(editor): update README and VSCode syntax for type removal + new operators
README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A statically typed, imperative programming language with algebraic data types, inspired by Rust and Gleam.
|
|
4
4
|
|
|
5
|
-
- Built on a [tree-sitter](plum-tooling/tree-sitter-plum) grammar, with syntax highlighting for Helix and
|
|
5
|
+
- Built on a [tree-sitter](plum-tooling/tree-sitter-plum) grammar, with syntax highlighting for Helix and VSCode out of the box (`plum editor helix` / `plum editor vscode`)
|
|
6
6
|
- Compiles to WebAssembly today, with plans to target amd64, arm64, and riscv64 via QBE (C-ABI compatible)
|
|
7
7
|
|
|
8
8
|
## Requirements
|
plum-tooling/vscode-plum/syntaxes/plum.tmLanguage.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"keywords": {
|
|
40
40
|
"patterns": [
|
|
41
41
|
{
|
|
42
|
-
"match": "\\b(module|
|
|
42
|
+
"match": "\\b(module|enum|trait|fun|self|test)\\b",
|
|
43
43
|
"name": "keyword.const.plum"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
@@ -58,6 +58,16 @@
|
|
|
58
58
|
"name": "keyword.operator.comparison.plum",
|
|
59
59
|
"match": "(==|!=|<=|>=|<|>)"
|
|
60
60
|
},
|
|
61
|
+
{
|
|
62
|
+
"comment": "elvis (Result/Option unwrap-or-fallback) — checked before the bare `?` try-operator below, since `?:` must win the longer match",
|
|
63
|
+
"name": "keyword.operator.elvis.plum",
|
|
64
|
+
"match": "\\?:"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"comment": "postfix try-operator (Result/Option unwrap-or-early-return) — matched only when `?` glues directly to the preceding token with no space, `plum format`'s own convention for this postfix operator (unlike ternary's `?`, always spaced); ternary's own `?`/`:` are deliberately left unstyled here too, matching the tree-sitter highlights.scm, since a regex can't reliably tell them apart",
|
|
68
|
+
"name": "keyword.operator.try.plum",
|
|
69
|
+
"match": "(?<=[A-Za-z0-9_\\)\\]])\\?(?!:)"
|
|
70
|
+
},
|
|
61
71
|
{
|
|
62
72
|
"name": "keyword.operator.logical.plum",
|
|
63
73
|
"match": "(&&|\\|\\|)"
|