Skip to content

Commit a0541ab

Browse files
committed
feat: Add infokey support. Closes #2
1 parent 2fbf5d7 commit a0541ab

File tree

7 files changed

+204
-1
lines changed

7 files changed

+204
-1
lines changed

Bakefile.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# shellcheck shell=bash
22

3+
task.init() {
4+
pnpm install
5+
}
6+
37
task.watch() {
48
pnpm run watch
59
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Syntax highlighting for
1818
- env
1919
- Handlebars
2020
- i3
21+
- infokey
2122
- JSON5
2223
- Ninja
2324
- gettext
@@ -42,3 +43,4 @@ Syntax highlighting for
4243
- [vscode-systemd](https://github.com/hangxingliu/vscode-systemd) by hangxingliu (MIT)
4344
- [ejs-grammar](https://github.com/Digitalbrainstem/ejs-grammar) by Digitalbrainstem (MIT)
4445
- [vscode-handlebars](https://github.com/andrejunges/vscode-handlebars) by andrejunges (MIT)
46+
- [vscode-infokey-plugin](https://github.com/UI-Apps/vscode-infokey-plugin) by UI-Apps (MIT)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"comments": {
3+
"lineComment": "#"
4+
}
5+
}

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@
113113
],
114114
"configuration": "./language-configuration/i3.language-configuration.json"
115115
},
116+
{
117+
"id": "infokey",
118+
"aliases": [
119+
"infokey"
120+
],
121+
"extensions": [
122+
"infokey"
123+
],
124+
"configuration": "./language-configuration/infokey.language-configuration.json"
125+
},
116126
{
117127
"id": "json5",
118128
"aliases": [
@@ -246,6 +256,11 @@
246256
"scopeName": "source.i3",
247257
"path": "./syntaxes/i3.tmLanguage.json"
248258
},
259+
{
260+
"language": "infokey",
261+
"scopeName": "source.infokey",
262+
"path": "./syntaxes/infokey.tmLanguage.json"
263+
},
249264
{
250265
"language": "json5",
251266
"scopeName": "source.json5",
@@ -295,6 +310,10 @@
295310
{
296311
"language": "handlebars",
297312
"path": "./snippets/handlebars.code-snippets"
313+
},
314+
{
315+
"language": "infokey",
316+
"path": "./snippets/infokey.code-snippets"
298317
}
299318
],
300319
"configurationDefaults": {

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

snippets/infokey.code-snippets

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"link-style": {
3+
"prefix": "ls",
4+
"body": "link-style",
5+
"description": "Inserts link-style variable"
6+
},
7+
"active-link-style": {
8+
"prefix": "als",
9+
"body": "active-link-style",
10+
"description": "Inserts active-link-style variable"
11+
},
12+
"match-style": {
13+
"prefix": "ms",
14+
"body": "match-style",
15+
"description": "Inserts match-style variable"
16+
},
17+
18+
"set-variable": {
19+
"prefix": "sv",
20+
"body": "set-variable",
21+
"description": "Inserts set-variable variable"
22+
},
23+
"describe-variable": {
24+
"prefix": "dv",
25+
"body": "describe-variable",
26+
"description": "Inserts describe-variable variable"
27+
},
28+
"automatic-footnotes": {
29+
"prefix": "af",
30+
"body": "automatic-footnotes",
31+
"description": "Inserts automatic-footnotes variable"
32+
},
33+
"automatic-tiling": {
34+
"prefix": "at",
35+
"body": "automatic-tiling",
36+
"description": "Inserts automatic-tiling variable"
37+
},
38+
"cursor-movement-scrolls": {
39+
"prefix": "cms",
40+
"body": "cursor-movement-scrolls",
41+
"description": "Inserts cursor-movement-scrolls variable"
42+
},
43+
"errors-ring-bell": {
44+
"prefix": "erb",
45+
"body": "errors-ring-bell",
46+
"description": "Inserts errors-ring-bell variable"
47+
},
48+
"follow-strategy": {
49+
"prefix": "fs",
50+
"body": "follow-strategy",
51+
"description": "Inserts follow-strategy variable"
52+
},
53+
"gc-compressed-files": {
54+
"prefix": "gcf",
55+
"body": "gc-compressed-files",
56+
"description": "Inserts gc-compressed-files variable"
57+
},
58+
"hide-note-references": {
59+
"prefix": "hnr",
60+
"body": "hide-note-references",
61+
"description": "Inserts hide-note-references variable"
62+
},
63+
"highlight-searches": {
64+
"prefix": "hs",
65+
"body": "highlight-searches",
66+
"description": "Inserts highlight-searches variable"
67+
},
68+
"infopath-no-defaults": {
69+
"prefix": "ind",
70+
"body": "infopath-no-defaults",
71+
"description": "Inserts infopath-no-defaults variable"
72+
},
73+
"ISO-Latin": {
74+
"prefix": "il",
75+
"body": "ISO-Latin",
76+
"description": "Inserts ISO-Latin variable"
77+
},
78+
"key-time": {
79+
"prefix": "kt",
80+
"body": "key-time",
81+
"description": "Inserts key-time variable"
82+
},
83+
"min-search-length": {
84+
"prefix": "msl",
85+
"body": "min-search-length",
86+
"description": "Inserts min-search-length variable"
87+
},
88+
"mouse": {
89+
"prefix": "m",
90+
"body": "mouse",
91+
"description": "Inserts mouse variable"
92+
},
93+
"nodeline": {
94+
"prefix": "n",
95+
"body": "nodeline",
96+
"description": "Inserts nodeline variable"
97+
},
98+
"scroll-behavior": {
99+
"prefix": "sb",
100+
"body": "scroll-behavior",
101+
"description": "Inserts scroll-behavior variable"
102+
},
103+
"scroll-last-node": {
104+
"prefix": "sln",
105+
"body": "scroll-last-node",
106+
"description": "Inserts scroll-last-node variable"
107+
},
108+
"scroll-step": {
109+
"prefix": "ss",
110+
"body": "scroll-step",
111+
"description": "Inserts scroll-step variable"
112+
},
113+
"search-skip-screen": {
114+
"prefix": "sss",
115+
"body": "search-skip-screen",
116+
"description": "Inserts search-skip-screen variable"
117+
},
118+
"show-index-match": {
119+
"prefix": "sim",
120+
"body": "show-index-match",
121+
"description": "Inserts show-index-match variable"
122+
},
123+
"visible-bell": {
124+
"prefix": "vb",
125+
"body": "visible-bell",
126+
"description": "Inserts visible-bell variable"
127+
}
128+
}

syntaxes/infokey.tmLanguage.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "infokey",
4+
"patterns": [
5+
{
6+
"include": "#comments"
7+
},
8+
{
9+
"include": "#variables"
10+
},
11+
{
12+
"include": "#keywords"
13+
},
14+
{
15+
"include": "#numbers"
16+
}
17+
],
18+
"repository": {
19+
"comments": {
20+
"patterns": [{
21+
"name": "comment.line.infokey",
22+
"match": "#.*"
23+
}]
24+
},
25+
"variables": {
26+
"patterns": [{
27+
"name": "variable.name.infokey",
28+
"match": "\\b((active-)?link-style|match-style|(set|describe)-variable|automatic-(footnotes|tiling)|cursor-movement-scrolls|errors-ring-bell|follow-strategy|gc-compressed-files|hide-note-references|highlight-searches|infopath-no-defaults|ISO-Latin|key-time|min-search-length|mouse|nodeline|scroll-(behaviou?r|last-node|step)|search-skip-screen|show-index-match|visible-bell)\\b"
29+
}]
30+
},
31+
"keywords": {
32+
"patterns": [{
33+
"name": "variable.name.infokey",
34+
"match": "\\b((bg)?(black|red|green|yellow|blue|magenta|cyan|white)|(bg)?nocolou?r|(no)?(underline|bold|blink|regular|standout)|O(n|ff)|remain|path)\\b"
35+
}]
36+
},
37+
"numbers": {
38+
"patterns": [{
39+
"name": "constant.numeric.infokey",
40+
"match": "\\b\\d+\\b"
41+
}]
42+
}
43+
},
44+
"scopeName": "source.infokey"
45+
}

0 commit comments

Comments
 (0)