-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
source.desktop.js
68 lines (66 loc) · 1.87 KB
/
source.desktop.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is licensed permissive.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
extensions: ['.desktop', '.desktop.in', '.service'],
names: ['desktop'],
patterns: [
{
begin: '(^[ \\t]+)?(?=#)',
beginCaptures: {
1: {name: 'punctuation.whitespace.comment.leading.desktop'}
},
end: '(?!\\G)',
patterns: [
{
begin: '#',
beginCaptures: {
0: {name: 'punctuation.defdesktoption.comment.desktop'}
},
end: '\\n',
name: 'comment.line.number-sign.desktop'
}
]
},
{
captures: {
1: {name: 'keyword.other.defdesktoption.desktop'},
2: {name: 'punctuation.separator.key-value.desktop'}
},
match: '\\b([a-zA-Z0-9_.-]+)\\b\\s*(=)'
},
{
captures: {
1: {name: 'punctuation.defdesktoption.entity.desktop'},
3: {name: 'punctuation.defdesktoption.entity.desktop'}
},
match: '^(\\[)(.*?)(\\])',
name: 'entity.name.section.group-title.desktop'
},
{
begin: "'",
beginCaptures: {
0: {name: 'punctuation.defdesktoption.string.begin.desktop'}
},
end: "'",
endCaptures: {0: {name: 'punctuation.defdesktoption.string.end.desktop'}},
name: 'string.quoted.single.desktop',
patterns: [{match: '\\\\.', name: 'constant.character.escape.desktop'}]
},
{
begin: '"',
beginCaptures: {
0: {name: 'punctuation.defdesktoption.string.begin.desktop'}
},
end: '"',
endCaptures: {0: {name: 'punctuation.defdesktoption.string.end.desktop'}},
name: 'string.quoted.double.desktop'
}
],
scopeName: 'source.desktop'
}
export default grammar