Skip to content

Commit 3e3d11d

Browse files
committed
make underline configuable
1 parent 989471d commit 3e3d11d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@
276276
"type": "string",
277277
"default": ""
278278
},
279+
"emmylua.colors.mutable_underline": {
280+
"type": "boolean",
281+
"default": true,
282+
"description": "Mutable variable underline"
283+
},
279284
"emmylua.ls.startParameters": {
280285
"type": "array",
281286
"default": []

src/annotator.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,15 @@ function updateDecorations() {
5555
D_PARAM = createDecoration("colors.parameter");
5656
D_GLOBAL = createDecoration("colors.global");
5757
D_LOCAL = createDecoration("colors.local");
58-
D_MUT_LOCAL = createDecorationUnderline("colors.local");
59-
D_MUT_PARAM = createDecorationUnderline("colors.parameter");
58+
let mutable_underline = vscode.workspace.getConfiguration("emmylua").get("colors.mutable_underline");
59+
if (mutable_underline) {
60+
D_MUT_LOCAL = createDecorationUnderline("colors.local");
61+
D_MUT_PARAM = createDecorationUnderline("colors.parameter");
62+
}
63+
else {
64+
D_MUT_LOCAL = createDecoration("colors.local");
65+
D_MUT_PARAM = createDecoration("colors.parameter");
66+
}
6067
}
6168

6269
export function onDidChangeConfiguration() {

0 commit comments

Comments
 (0)