Skip to content

Commit 25ea28a

Browse files
committed
feature: support enable/disable code formatter.
1 parent 5997feb commit 25ea28a

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
"LuaCoderAssist.format.enable": {
211211
"type": "boolean",
212212
"default": true,
213-
"description": "Enable/Disable code formatting."
213+
"description": "Enable/Disable code formatter."
214214
},
215215
"LuaCoderAssist.format.lineWidth": {
216216
"type": "integer",
@@ -321,4 +321,4 @@
321321
"type": "git",
322322
"url": "https://github.com/liwangqian/LuaCoderAssist"
323323
}
324-
}
324+
}

server/providers/format-provider.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ class FormatProvider {
5252
}
5353

5454
_formatOptions(userOptions) {
55-
let formatEnable = true;
56-
if (!userOptions.enable) {
57-
formatEnable = false;
58-
}
59-
6055
return {
61-
enable: formatEnable,
6256
lineWidth: userOptions.lineWidth || 120,
6357
indentCount: userOptions.indentCount || 4,
6458
quotemark: userOptions.quotemark || 'single'

0 commit comments

Comments
 (0)