Skip to content

Commit 41177b7

Browse files
committed
Icons now work with themes rather than acting as one
1 parent abf3044 commit 41177b7

File tree

2 files changed

+53
-21
lines changed

2 files changed

+53
-21
lines changed

client/src/extension.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ export function activate(context: ExtensionContext) {
3939
// Options to control the language client
4040
const clientOptions: LanguageClientOptions = {
4141
// Register the server for plain text documents
42-
documentSelector: [{ scheme: 'file', language: 'vba' }],
42+
documentSelector: [
43+
{ scheme: 'file', language: 'vba-class' },
44+
{ scheme: 'file', language: 'vba-module' },
45+
{ scheme: 'file', language: 'vba-form' }
46+
],
4347
synchronize: {
4448
// Notify the server about file changes to '.clientrc files contained in the workspace
4549
fileEvents: workspace.createFileSystemWatcher('**/.clientrc')

package.json

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"Programming Languages",
1717
"Snippets",
1818
"Linters",
19-
"Formatters",
20-
"Themes"
19+
"Formatters"
2120
],
2221
"keywords": [
2322
"multi-root ready"
@@ -30,23 +29,34 @@
3029
"contributes": {
3130
"languages": [
3231
{
33-
"id": "vba",
34-
"aliases": [
35-
"VBA"
36-
],
37-
"extensions": [
38-
".bas",
39-
".cls",
40-
".frm"
41-
],
42-
"configuration": "./vba.language-configuration.json"
43-
}
44-
],
45-
"iconThemes": [
32+
"id": "vba-class",
33+
"aliases": ["VBA"],
34+
"extensions": [".cls"],
35+
"configuration": "./vba.language-configuration.json",
36+
"icon": {
37+
"dark": "icons/vba_blue.svg",
38+
"light": "icons/vba_blue.svg"
39+
}
40+
},
41+
{
42+
"id": "vba-module",
43+
"aliases": ["VBA"],
44+
"extensions": [".bas"],
45+
"configuration": "./vba.language-configuration.json",
46+
"icon": {
47+
"dark": "icons/vba_orange.svg",
48+
"light": "icons/vba_orange.svg"
49+
}
50+
},
4651
{
47-
"id": "vba-lsp",
48-
"label": "VBA Icons",
49-
"path": "icon-theme.json"
52+
"id": "vba-form",
53+
"aliases": ["VBA"],
54+
"extensions": [".frm"],
55+
"configuration": "./vba.language-configuration.json",
56+
"icon": {
57+
"dark": "icons/vba_green.svg",
58+
"light": "icons/vba_green.svg"
59+
}
5060
}
5161
],
5262
"configurationDefaults": {
@@ -125,14 +135,32 @@
125135
},
126136
"grammars": [
127137
{
128-
"language": "vba",
138+
"language": "vba-class",
139+
"scopeName": "source.vba",
140+
"path": "./client/out/vba.tmLanguage.json"
141+
},
142+
{
143+
"language": "vba-module",
144+
"scopeName": "source.vba",
145+
"path": "./client/out/vba.tmLanguage.json"
146+
},
147+
{
148+
"language": "vba-form",
129149
"scopeName": "source.vba",
130150
"path": "./client/out/vba.tmLanguage.json"
131151
}
132152
],
133153
"snippets": [
134154
{
135-
"language": "vba",
155+
"language": "vba-class",
156+
"path": "./snippets/vba.json"
157+
},
158+
{
159+
"language": "vba-module",
160+
"path": "./snippets/vba.json"
161+
},
162+
{
163+
"language": "vba-form",
136164
"path": "./snippets/vba.json"
137165
}
138166
]

0 commit comments

Comments
 (0)