Skip to content

Commit bd9c4b7

Browse files
Update VS Code extension with fixed syntax highlighting and assets
1 parent 6d122b4 commit bd9c4b7

6 files changed

Lines changed: 92 additions & 43 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ Makefile
7979

8080
# Jupyter
8181
.ipynb_checkpoints/
82+
PAPA.md

ison-vscode/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Mahesh Vaikri
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

ison-vscode/images/ison-icon.png

95.9 KB
Loading

ison-vscode/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"version": "1.0.0",
66
"publisher": "ison-dev",
77
"author": {
8-
"name": "Mahesh Vaikri"
8+
"name": "Mahesh Vaikri",
9+
"url": "https://github.com/maheshvaikri-code"
910
},
1011
"license": "MIT",
1112
"repository": {

ison-vscode/syntaxes/ison.tmLanguage.json

Lines changed: 51 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
{ "include": "#comments" },
77
{ "include": "#block-header" },
88
{ "include": "#summary-separator" },
9-
{ "include": "#field-definitions" },
10-
{ "include": "#data-values" }
9+
{ "include": "#strings" },
10+
{ "include": "#references" },
11+
{ "include": "#booleans" },
12+
{ "include": "#null" },
13+
{ "include": "#numbers" },
14+
{ "include": "#identifiers" }
1115
],
1216
"repository": {
1317
"comments": {
@@ -27,24 +31,7 @@
2731
"name": "keyword.operator.separator.ison",
2832
"match": "^---$"
2933
},
30-
"field-definitions": {
31-
"patterns": [
32-
{
33-
"name": "meta.field-typed.ison",
34-
"match": "(\\w+)(:)(int|float|string|bool|ref|date|datetime|uuid|json)",
35-
"captures": {
36-
"1": { "name": "variable.other.field.ison" },
37-
"2": { "name": "punctuation.separator.type.ison" },
38-
"3": { "name": "storage.type.ison" }
39-
}
40-
},
41-
{
42-
"name": "variable.other.field.ison",
43-
"match": "(?<=^|\\s)(\\w+)(?=\\s|$)"
44-
}
45-
]
46-
},
47-
"data-values": {
34+
"strings": {
4835
"patterns": [
4936
{
5037
"name": "string.quoted.double.ison",
@@ -67,42 +54,64 @@
6754
"match": "\\\\."
6855
}
6956
]
70-
},
57+
}
58+
]
59+
},
60+
"references": {
61+
"patterns": [
7162
{
72-
"name": "constant.language.null.ison",
73-
"match": "(?<=^|\\s)(null|~)(?=\\s|$)"
63+
"name": "variable.other.reference.ison",
64+
"match": ":[A-Z_]+:[\\w]+",
65+
"captures": {
66+
"0": { "name": "support.type.reference.ison" }
67+
}
7468
},
69+
{
70+
"name": "variable.other.reference.simple.ison",
71+
"match": ":[\\w]+\\b",
72+
"captures": {
73+
"0": { "name": "support.type.reference.ison" }
74+
}
75+
}
76+
]
77+
},
78+
"booleans": {
79+
"patterns": [
7580
{
7681
"name": "constant.language.boolean.true.ison",
77-
"match": "(?<=^|\\s)true(?=\\s|$)"
82+
"match": "\\btrue\\b"
7883
},
7984
{
8085
"name": "constant.language.boolean.false.ison",
81-
"match": "(?<=^|\\s)false(?=\\s|$)"
82-
},
86+
"match": "\\bfalse\\b"
87+
}
88+
]
89+
},
90+
"null": {
91+
"name": "constant.language.null.ison",
92+
"match": "\\b(null|~)\\b"
93+
},
94+
"numbers": {
95+
"patterns": [
8396
{
8497
"name": "constant.numeric.float.ison",
85-
"match": "(?<=^|\\s)-?\\d+\\.\\d+(?=\\s|$)"
98+
"match": "-?\\b\\d+\\.\\d+\\b"
8699
},
87100
{
88101
"name": "constant.numeric.integer.ison",
89-
"match": "(?<=^|\\s)-?\\d+(?=\\s|$)"
90-
},
91-
{
92-
"name": "meta.reference.ison",
93-
"match": "(:)([A-Z_]+)?(:)?(\\w+)",
94-
"captures": {
95-
"1": { "name": "punctuation.definition.reference.ison" },
96-
"2": { "name": "entity.name.tag.relationship.ison" },
97-
"3": { "name": "punctuation.separator.namespace.ison" },
98-
"4": { "name": "variable.other.reference.ison" }
99-
}
100-
},
102+
"match": "-?\\b\\d+\\b"
103+
}
104+
]
105+
},
106+
"identifiers": {
107+
"patterns": [
101108
{
102-
"name": "variable.other.reference.simple.ison",
103-
"match": "(?<=^|\\s):(\\w+)(?=\\s|$)",
109+
"name": "meta.field-typed.ison",
110+
"match": "(\\w+)(:)(int|float|string|bool|ref|date|datetime|uuid|json)\\b",
104111
"captures": {
105-
"1": { "name": "variable.other.reference.id.ison" }
112+
"1": { "name": "variable.other.field.ison" },
113+
"2": { "name": "punctuation.separator.type.ison" },
114+
"3": { "name": "storage.type.ison" }
106115
}
107116
}
108117
]

test.ison

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
table.users
2+
id name email active
3+
1 Alice alice@example.com true
4+
2 Bob bob@example.com false
5+
3 Charlie charlie@test.com true
6+
7+
object.config
8+
timeout 30
9+
debug true
10+
api_key "sk-xxx-secret"
11+
max_retries 3
12+
13+
table.orders
14+
id user_id product total
15+
O1 :1 "Widget Pro" 99.99
16+
O2 :2 "Gadget Plus" 149.50
17+
O3 :1 "Super Tool" 299.00

0 commit comments

Comments
 (0)