summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-09-16 20:07:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-09-16 20:07:35 +0800
commit15755fc15b45f0dea8e7c6aa7a90316c6e75f60f (patch)
tree80c9351ad906733a164d6ffad107235caa19817e
parente5d40337f9e0cb57c5078b5ded065742f6b8553c (diff)
downloadlua-language-server-15755fc15b45f0dea8e7c6aa7a90316c6e75f60f.zip
插件配置
-rw-r--r--package.json15
-rw-r--r--server/build_package.lua17
-rw-r--r--server/src/config.lua4
3 files changed, 35 insertions, 1 deletions
diff --git a/package.json b/package.json
index 732c35cf..2c39bdfa 100644
--- a/package.json
+++ b/package.json
@@ -256,6 +256,18 @@
"title": "severity",
"type": "object"
},
+ "Lua.plugin.enable": {
+ "default": false,
+ "markdownDescription": "%config.plugin.enable%",
+ "scope": "resource",
+ "type": "boolean"
+ },
+ "Lua.plugin.path": {
+ "default": false,
+ "markdownDescription": "%config.plugin.path%",
+ "scope": "resource",
+ "type": "${workspaceRoot}/.vscode/lua/*.lua"
+ },
"Lua.runtime.path": {
"default": [
"?.lua",
@@ -283,6 +295,9 @@
"type": "string"
},
"Lua.workspace.ignoreDir": {
+ "default": [
+ "./.vscode/"
+ ],
"items": {
"type": "string"
},
diff --git a/server/build_package.lua b/server/build_package.lua
index 02d1c82b..63074cfa 100644
--- a/server/build_package.lua
+++ b/server/build_package.lua
@@ -99,7 +99,10 @@ local package = {
items = {
type = 'string',
},
- markdownDescription = "%config.workspace.ignoreDir%"
+ markdownDescription = "%config.workspace.ignoreDir%",
+ default = {
+ "./.vscode/",
+ },
},
["Lua.workspace.ignoreSubmodules"] = {
scope = "resource",
@@ -142,6 +145,18 @@ local package = {
default = true,
markdownDescription = "%config.completion.callSnippet%"
},
+ ["Lua.plugin.enable"] = {
+ scope = "resource",
+ type = "boolean",
+ default = false,
+ markdownDescription = "%config.plugin.enable%"
+ },
+ ["Lua.plugin.path"] = {
+ scope = "resource",
+ type = "${workspaceRoot}/.vscode/lua/*.lua",
+ default = false,
+ markdownDescription = "%config.plugin.path%"
+ },
}
},
grammars = {
diff --git a/server/src/config.lua b/server/src/config.lua
index a71cb191..774af499 100644
--- a/server/src/config.lua
+++ b/server/src/config.lua
@@ -123,6 +123,10 @@ local ConfigTemplate = {
enable = {true, Boolean},
callSnippet = {true, Boolean},
},
+ plugin = {
+ enable = {false, Boolean},
+ path = {'${workspaceRoot}/.vscode/lua/', String},
+ },
}
local OtherTemplate = {