diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-14 09:56:24 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-14 09:56:24 +0800 |
commit | 8adaa0391068da2c6b7a65ef52badebe8fd533f6 (patch) | |
tree | 8c8bd7e4ffdf512e8e154572005ce5a0b03d127b /server/test | |
parent | fd9400f674f90bb131451e42835f0ac924b50aa4 (diff) | |
download | lua-language-server-8adaa0391068da2c6b7a65ef52badebe8fd533f6.zip |
package.json 生成
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/build_package.lua | 126 | ||||
-rw-r--r-- | server/test/main.lua | 1 |
2 files changed, 127 insertions, 0 deletions
diff --git a/server/test/build_package.lua b/server/test/build_package.lua new file mode 100644 index 00000000..b68beb06 --- /dev/null +++ b/server/test/build_package.lua @@ -0,0 +1,126 @@ +local json = require 'json' + +local package = { + name = "lua", + displayName = "Lua", + description = "Lua Language Server coded by Lua", + author = "sumneko", + icon = "images/logo.png", + license = "MIT", + repository = { + type = "git", + url = "https://github.com/sumneko/lua-language-server" + }, + publisher = "sumneko", + categories = { + "Linters", + "Programming Languages", + "Snippets" + }, + keywords = { + "Lua", + "LSP", + "GoTo Definition", + "IntelliSense" + }, + engines = { + vscode = "^1.23.0" + }, + activationEvents = { + "onLanguage:lua" + }, + main = "./client/out/extension", + contributes = { + configuration = { + type = "object", + title = "Lua", + properties = { + ["Lua.runtime.version"] = { + scope = "resource", + type = "string", + default = "Lua 5.3", + enum = { + "Lua 5.1", + "Lua 5.2", + "Lua 5.3", + "Lua 5.4", + "LuaJIT" + }, + description = "%config.runtime.version%" + }, + ["Lua.runtime.path"] = { + scope = "resource", + type = "array", + items = "string", + description = "%config.runtime.path%", + default = { + "?.lua", + "?/init.lua", + "?/?.lua" + } + }, + ["Lua.diagnostics.disable"] = { + scope = "resource", + type = "array", + items = "string", + description = "%config.diagnostics.disable%" + }, + ["Lua.diagnostics.globals"] = { + scope = "resource", + type = "array", + items = "string", + description = "%config.diagnostics.globals%" + }, + ["Lua.workspace.ignoreDir"] = { + scope = "resource", + type = "array", + items = "string", + description = "%config.workspace.ignoreDir%" + }, + ["Lua.workspace.ignoreSubmodules"] = { + scope = "resource", + type = "boolean", + default = true, + description = "%config.workspace.ignoreSubmodules%" + }, + ["Lua.workspace.useGitIgnore"] = { + scope = "resource", + type = "boolean", + default = true, + markdownDescription = "%config.workspace.useGitIgnore%" + }, + ["Lua.workspace.maxPreload"] = { + scope = "resource", + type = "integer", + default = 300, + description = "%config.workspace.maxPreload%" + }, + ["Lua.workspace.preloadFileSize"] = { + scope = "resource", + type = "integer", + default = 100, + description = "%config.workspace.preloadFileSize%" + } + } + }, + grammars = { + { + language = "lua", + scopeName = "source.lua", + path = "syntaxes/lua.tmLanguage.json" + } + } + }, + scripts = { + ["vscode:prepublish"] = "cd client && npm run update-vscode && cd .." + }, + __metadata = { + id = "3a15b5a7-be12-47e3-8445-88ee3eabc8b2", + publisherDisplayName = "sumneko", + publisherId = "fb626675-24cf-4881-8c13-b465f29bec2f" + } +} + +package.version = "0.9.2" + +io.save(ROOT:parent_path() / 'package.json', json.encode(package)) diff --git a/server/test/main.lua b/server/test/main.lua index 10d5e155..16926e3c 100644 --- a/server/test/main.lua +++ b/server/test/main.lua @@ -15,6 +15,7 @@ ac = {} require 'utility' require 'global_protect' +require 'build_package' local function main() local function test(name) |