A structured procedural language w/ a Lisp runtime / Rust ATProto bridge, to build a working TUI Bsky client
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add initial VS Code language support for Superplan

FormerLab aee3b42b e5e5e317

+194
+22
editors/vscode/superplan/README.md
··· 1 + # Superplan Language Support 2 + 3 + Minimal VS Code language support for Superplan 4 + 5 + ## Features 6 + 7 + - Syntax highlighting 8 + - Comment support (`;`) 9 + - Bracket matching 10 + - String highlighting 11 + - Keyword/type/operator highlighting 12 + 13 + ## File extension 14 + 15 + Use `.spl` for Superplan source files. 16 + 17 + ## Install locally 18 + 19 + From this folder: 20 + 21 + ```bash 22 + code --install-extension .
+28
editors/vscode/superplan/language-configuration.json
··· 1 + { 2 + "comments": { 3 + "lineComment": ";" 4 + }, 5 + "brackets": [ 6 + ["(", ")"], 7 + ["[", "]"] 8 + ], 9 + "autoClosingPairs": [ 10 + { 11 + "open": "(", 12 + "close": ")" 13 + }, 14 + { 15 + "open": "[", 16 + "close": "]" 17 + }, 18 + { 19 + "open": "\"", 20 + "close": "\"" 21 + } 22 + ], 23 + "surroundingPairs": [ 24 + ["(", ")"], 25 + ["[", "]"], 26 + ["\"", "\""] 27 + ] 28 + }
+30
editors/vscode/superplan/package.json
··· 1 + { 2 + "name": "superplan-language", 3 + "displayName": "Superplan Language Support", 4 + "description": "Syntax highlighting and language configuration for Superplan", 5 + "version": "0.0.1", 6 + "publisher": "formerlab", 7 + "engines": { 8 + "vscode": "^1.85.0" 9 + }, 10 + "categories": [ 11 + "Programming Languages" 12 + ], 13 + "contributes": { 14 + "languages": [ 15 + { 16 + "id": "superplan", 17 + "aliases": ["Superplan", "superplan"], 18 + "extensions": [".spl"], 19 + "configuration": "./language-configuration.json" 20 + } 21 + ], 22 + "grammars": [ 23 + { 24 + "language": "superplan", 25 + "scopeName": "source.superplan", 26 + "path": "./syntaxes/superplan.tmLanguage.json" 27 + } 28 + ] 29 + } 30 + }
+114
editors/vscode/superplan/syntaxes/superplan.tmLanguage.json
··· 1 + { 2 + "name": "Superplan", 3 + "scopeName": "source.superplan", 4 + "patterns": [ 5 + { "include": "#comments" }, 6 + { "include": "#keywords" }, 7 + { "include": "#types" }, 8 + { "include": "#booleans" }, 9 + { "include": "#numbers" }, 10 + { "include": "#strings" }, 11 + { "include": "#procedures" }, 12 + { "include": "#functionCalls" }, 13 + { "include": "#identifiers" }, 14 + { "include": "#operators" } 15 + ], 16 + "repository": { 17 + "comments": { 18 + "patterns": [ 19 + { 20 + "name": "comment.line.semicolon.superplan", 21 + "match": ";.*$" 22 + } 23 + ] 24 + }, 25 + "keywords": { 26 + "patterns": [ 27 + { 28 + "name": "keyword.control.superplan", 29 + "match": "\\b(PROGRAM|BEGIN|END|PROCEDURE|CALL|IF|THEN|ELSE|WHILE|DO|FOR|TO|STEP|STOP)\\b" 30 + } 31 + ] 32 + }, 33 + "types": { 34 + "patterns": [ 35 + { 36 + "name": "storage.type.superplan", 37 + "match": "\\b(INTEGER|BOOLEAN|STRING|JSON|ARRAY|RECORD)\\b" 38 + } 39 + ] 40 + }, 41 + "booleans": { 42 + "patterns": [ 43 + { 44 + "name": "constant.language.boolean.superplan", 45 + "match": "\\b(TRUE|FALSE)\\b" 46 + } 47 + ] 48 + }, 49 + "numbers": { 50 + "patterns": [ 51 + { 52 + "name": "constant.numeric.integer.superplan", 53 + "match": "\\b[0-9]+\\b" 54 + } 55 + ] 56 + }, 57 + "strings": { 58 + "name": "string.quoted.double.superplan", 59 + "begin": "\"", 60 + "end": "\"", 61 + "patterns": [ 62 + { 63 + "name": "constant.character.escape.superplan", 64 + "match": "\\\\[\\\\\"ntr]" 65 + } 66 + ] 67 + }, 68 + "procedures": { 69 + "patterns": [ 70 + { 71 + "name": "entity.name.function.superplan", 72 + "match": "(?<=\\bPROGRAM\\s)[A-Z_][A-Z0-9_]*\\b" 73 + }, 74 + { 75 + "name": "entity.name.function.superplan", 76 + "match": "(?<=\\bPROCEDURE\\s)[A-Z_][A-Z0-9_]*\\b" 77 + } 78 + ] 79 + }, 80 + "functionCalls": { 81 + "patterns": [ 82 + { 83 + "name": "support.function.superplan", 84 + "match": "\\b[A-Z_][A-Z0-9_]*(?=\\()" 85 + } 86 + ] 87 + }, 88 + "identifiers": { 89 + "patterns": [ 90 + { 91 + "name": "variable.other.superplan", 92 + "match": "\\b[A-Z_][A-Z0-9_]*\\b" 93 + } 94 + ] 95 + }, 96 + "operators": { 97 + "patterns": [ 98 + { 99 + "name": "keyword.operator.logical.superplan", 100 + "match": "\\b(AND|OR|NOT)\\b" 101 + }, 102 + { 103 + "name": "keyword.operator.comparison.superplan", 104 + "match": "(<>|<=|>=|=|<|>)" 105 + }, 106 + { 107 + "name": "keyword.operator.arithmetic.superplan", 108 + "match": "(\\+|-|\\*|/)" 109 + } 110 + ] 111 + } 112 + }, 113 + "uuid": "d3f1d7b2-6e0a-4d10-9f5c-1f4e6d43b001" 114 + }