Skip to content

Commit c825d90

Browse files
committed
feat: Add basic inputrc language
1 parent 8ff3455 commit c825d90

File tree

5 files changed

+69
-0
lines changed

5 files changed

+69
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Snippets for
88

99
- EJS
1010
- Handlebars
11+
- infokey
1112

1213
Syntax highlighting for
1314

@@ -20,6 +21,7 @@ Syntax highlighting for
2021
- HLA
2122
- i3
2223
- infokey
24+
- inputrc
2325
- JSON5
2426
- Ninja
2527
- gettext
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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@
134134
],
135135
"configuration": "./language-configuration/infokey.language-configuration.json"
136136
},
137+
{
138+
"id": "inputrc",
139+
"aliases": [
140+
"inputrc"
141+
],
142+
"extensions": [
143+
"inputrc"
144+
],
145+
"configuration": "./language-configuration/inputrc.language-configuration.json"
146+
},
137147
{
138148
"id": "json5",
139149
"aliases": [
@@ -277,6 +287,11 @@
277287
"scopeName": "source.infokey",
278288
"path": "./syntaxes/infokey.tmLanguage.json"
279289
},
290+
{
291+
"language": "inputrc",
292+
"scopeName": "source.inputrc",
293+
"path": "./syntaxes/inputrc.tmLanguage.json"
294+
},
280295
{
281296
"language": "json5",
282297
"scopeName": "source.json5",

syntaxes/inputrc.tmLanguage.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "inputrc",
4+
"scopeName": "source.inputrc",
5+
"patterns": [
6+
{
7+
"include": "#comments"
8+
},
9+
{
10+
"include": "#conditional"
11+
},
12+
{
13+
"include": "#set"
14+
}
15+
],
16+
"repository": {
17+
"comments": {
18+
"patterns": [
19+
{
20+
"name": "comment",
21+
"match": "^#.*?$"
22+
}
23+
]
24+
},
25+
"conditional": {
26+
"patterns": [
27+
{
28+
"name": "keyword",
29+
"match": "\\$(?:if|endif|else|include)"
30+
}
31+
]
32+
},
33+
"set": {
34+
"patterns": [
35+
{
36+
"name": "constant.other",
37+
"match": "set"
38+
}
39+
]
40+
}
41+
}
42+
}

testdata/1.inputrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set a b
2+
3+
$include /bravo
4+
5+
# comment

0 commit comments

Comments
 (0)