Skip to content

Commit 8adaa03

Browse files
committed
package.json 生成
1 parent fd9400f commit 8adaa03

File tree

3 files changed

+247
-120
lines changed

3 files changed

+247
-120
lines changed

package.json

Lines changed: 120 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,121 @@
11
{
2-
"name": "lua",
3-
"displayName": "Lua",
4-
"description": "Lua Language Server coded by Lua",
5-
"author": "sumneko",
6-
"icon": "images/logo.png",
7-
"license": "MIT",
8-
"version": "0.9.2",
9-
"repository": {
10-
"type": "git",
11-
"url": "https://github.com/sumneko/lua-language-server"
12-
},
13-
"publisher": "sumneko",
14-
"categories": [
15-
"Linters",
16-
"Programming Languages",
17-
"Snippets"
18-
],
19-
"keywords": [
20-
"Lua",
21-
"LSP",
22-
"GoTo Definition",
23-
"IntelliSense"
24-
],
25-
"engines": {
26-
"vscode": "^1.23.0"
27-
},
28-
"activationEvents": [
29-
"onLanguage:lua"
30-
],
31-
"main": "./client/out/extension",
32-
"contributes": {
33-
"configuration": {
34-
"type": "object",
35-
"title": "Lua",
36-
"properties": {
37-
"Lua.runtime.version": {
38-
"scope": "resource",
39-
"type": "string",
40-
"default": "Lua 5.3",
41-
"enum": [
42-
"Lua 5.1",
43-
"Lua 5.2",
44-
"Lua 5.3",
45-
"Lua 5.4",
46-
"LuaJIT"
47-
],
48-
"description": "%config.runtime.version%"
49-
},
50-
"Lua.runtime.path": {
51-
"scope": "resource",
52-
"type": "array",
53-
"items": "string",
54-
"description": "%config.runtime.path%",
55-
"default": [
56-
"?.lua",
57-
"?/init.lua",
58-
"?/?.lua"
59-
]
60-
},
61-
"Lua.diagnostics.disable": {
62-
"scope": "resource",
63-
"type": "array",
64-
"items": "string",
65-
"description": "%config.diagnostics.disable%"
66-
},
67-
"Lua.diagnostics.globals": {
68-
"scope": "resource",
69-
"type": "array",
70-
"items": "string",
71-
"description": "%config.diagnostics.globals%"
72-
},
73-
"Lua.workspace.ignoreDir": {
74-
"scope": "resource",
75-
"type": "array",
76-
"items": "string",
77-
"description": "%config.workspace.ignoreDir%"
78-
},
79-
"Lua.workspace.ignoreSubmodules": {
80-
"scope": "resource",
81-
"type": "boolean",
82-
"default": true,
83-
"description": "%config.workspace.ignoreSubmodules%"
84-
},
85-
"Lua.workspace.useGitIgnore": {
86-
"scope": "resource",
87-
"type": "boolean",
88-
"default": true,
89-
"markdownDescription": "%config.workspace.useGitIgnore%"
90-
},
91-
"Lua.workspace.maxPreload": {
92-
"scope": "resource",
93-
"type": "integer",
94-
"default": 300,
95-
"description": "%config.workspace.maxPreload%"
96-
},
97-
"Lua.workspace.preloadFileSize": {
98-
"scope": "resource",
99-
"type": "integer",
100-
"default": 100,
101-
"description": "%config.workspace.preloadFileSize%"
102-
}
103-
}
104-
},
105-
"grammars": [
106-
{
107-
"language": "lua",
108-
"scopeName": "source.lua",
109-
"path": "syntaxes/lua.tmLanguage.json"
110-
}
111-
]
112-
},
113-
"scripts": {
114-
"vscode:prepublish": "cd client && npm run update-vscode && cd .."
115-
},
116-
"__metadata": {
117-
"id": "3a15b5a7-be12-47e3-8445-88ee3eabc8b2",
118-
"publisherDisplayName": "sumneko",
119-
"publisherId": "fb626675-24cf-4881-8c13-b465f29bec2f"
120-
}
121-
}
2+
"__metadata": {
3+
"id": "3a15b5a7-be12-47e3-8445-88ee3eabc8b2",
4+
"publisherDisplayName": "sumneko",
5+
"publisherId": "fb626675-24cf-4881-8c13-b465f29bec2f"
6+
},
7+
"activationEvents": [
8+
"onLanguage:lua"
9+
],
10+
"author": "sumneko",
11+
"categories": [
12+
"Linters",
13+
"Programming Languages",
14+
"Snippets"
15+
],
16+
"contributes": {
17+
"configuration": {
18+
"properties": {
19+
"Lua.diagnostics.disable": {
20+
"description": "%config.diagnostics.disable%",
21+
"items": "string",
22+
"scope": "resource",
23+
"type": "array"
24+
},
25+
"Lua.diagnostics.globals": {
26+
"description": "%config.diagnostics.globals%",
27+
"items": "string",
28+
"scope": "resource",
29+
"type": "array"
30+
},
31+
"Lua.runtime.path": {
32+
"default": [
33+
"?.lua",
34+
"?/init.lua",
35+
"?/?.lua"
36+
],
37+
"description": "%config.runtime.path%",
38+
"items": "string",
39+
"scope": "resource",
40+
"type": "array"
41+
},
42+
"Lua.runtime.version": {
43+
"default": "Lua 5.3",
44+
"description": "%config.runtime.version%",
45+
"enum": [
46+
"Lua 5.1",
47+
"Lua 5.2",
48+
"Lua 5.3",
49+
"Lua 5.4",
50+
"LuaJIT"
51+
],
52+
"scope": "resource",
53+
"type": "string"
54+
},
55+
"Lua.workspace.ignoreDir": {
56+
"description": "%config.workspace.ignoreDir%",
57+
"items": "string",
58+
"scope": "resource",
59+
"type": "array"
60+
},
61+
"Lua.workspace.ignoreSubmodules": {
62+
"default": true,
63+
"description": "%config.workspace.ignoreSubmodules%",
64+
"scope": "resource",
65+
"type": "boolean"
66+
},
67+
"Lua.workspace.maxPreload": {
68+
"default": 300,
69+
"description": "%config.workspace.maxPreload%",
70+
"scope": "resource",
71+
"type": "integer"
72+
},
73+
"Lua.workspace.preloadFileSize": {
74+
"default": 100,
75+
"description": "%config.workspace.preloadFileSize%",
76+
"scope": "resource",
77+
"type": "integer"
78+
},
79+
"Lua.workspace.useGitIgnore": {
80+
"default": true,
81+
"markdownDescription": "%config.workspace.useGitIgnore%",
82+
"scope": "resource",
83+
"type": "boolean"
84+
}
85+
},
86+
"title": "Lua",
87+
"type": "object"
88+
},
89+
"grammars": [
90+
{
91+
"language": "lua",
92+
"path": "syntaxes/lua.tmLanguage.json",
93+
"scopeName": "source.lua"
94+
}
95+
]
96+
},
97+
"description": "Lua Language Server coded by Lua",
98+
"displayName": "Lua",
99+
"engines": {
100+
"vscode": "^1.23.0"
101+
},
102+
"icon": "images/logo.png",
103+
"keywords": [
104+
"Lua",
105+
"LSP",
106+
"GoTo Definition",
107+
"IntelliSense"
108+
],
109+
"license": "MIT",
110+
"main": "./client/out/extension",
111+
"name": "lua",
112+
"publisher": "sumneko",
113+
"repository": {
114+
"type": "git",
115+
"url": "https://github.com/sumneko/lua-language-server"
116+
},
117+
"scripts": {
118+
"vscode:prepublish": "cd client && npm run update-vscode && cd .."
119+
},
120+
"version": "0.9.2"
121+
}

server/test/build_package.lua

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
local json = require 'json'
2+
3+
local package = {
4+
name = "lua",
5+
displayName = "Lua",
6+
description = "Lua Language Server coded by Lua",
7+
author = "sumneko",
8+
icon = "images/logo.png",
9+
license = "MIT",
10+
repository = {
11+
type = "git",
12+
url = "https://github.com/sumneko/lua-language-server"
13+
},
14+
publisher = "sumneko",
15+
categories = {
16+
"Linters",
17+
"Programming Languages",
18+
"Snippets"
19+
},
20+
keywords = {
21+
"Lua",
22+
"LSP",
23+
"GoTo Definition",
24+
"IntelliSense"
25+
},
26+
engines = {
27+
vscode = "^1.23.0"
28+
},
29+
activationEvents = {
30+
"onLanguage:lua"
31+
},
32+
main = "./client/out/extension",
33+
contributes = {
34+
configuration = {
35+
type = "object",
36+
title = "Lua",
37+
properties = {
38+
["Lua.runtime.version"] = {
39+
scope = "resource",
40+
type = "string",
41+
default = "Lua 5.3",
42+
enum = {
43+
"Lua 5.1",
44+
"Lua 5.2",
45+
"Lua 5.3",
46+
"Lua 5.4",
47+
"LuaJIT"
48+
},
49+
description = "%config.runtime.version%"
50+
},
51+
["Lua.runtime.path"] = {
52+
scope = "resource",
53+
type = "array",
54+
items = "string",
55+
description = "%config.runtime.path%",
56+
default = {
57+
"?.lua",
58+
"?/init.lua",
59+
"?/?.lua"
60+
}
61+
},
62+
["Lua.diagnostics.disable"] = {
63+
scope = "resource",
64+
type = "array",
65+
items = "string",
66+
description = "%config.diagnostics.disable%"
67+
},
68+
["Lua.diagnostics.globals"] = {
69+
scope = "resource",
70+
type = "array",
71+
items = "string",
72+
description = "%config.diagnostics.globals%"
73+
},
74+
["Lua.workspace.ignoreDir"] = {
75+
scope = "resource",
76+
type = "array",
77+
items = "string",
78+
description = "%config.workspace.ignoreDir%"
79+
},
80+
["Lua.workspace.ignoreSubmodules"] = {
81+
scope = "resource",
82+
type = "boolean",
83+
default = true,
84+
description = "%config.workspace.ignoreSubmodules%"
85+
},
86+
["Lua.workspace.useGitIgnore"] = {
87+
scope = "resource",
88+
type = "boolean",
89+
default = true,
90+
markdownDescription = "%config.workspace.useGitIgnore%"
91+
},
92+
["Lua.workspace.maxPreload"] = {
93+
scope = "resource",
94+
type = "integer",
95+
default = 300,
96+
description = "%config.workspace.maxPreload%"
97+
},
98+
["Lua.workspace.preloadFileSize"] = {
99+
scope = "resource",
100+
type = "integer",
101+
default = 100,
102+
description = "%config.workspace.preloadFileSize%"
103+
}
104+
}
105+
},
106+
grammars = {
107+
{
108+
language = "lua",
109+
scopeName = "source.lua",
110+
path = "syntaxes/lua.tmLanguage.json"
111+
}
112+
}
113+
},
114+
scripts = {
115+
["vscode:prepublish"] = "cd client && npm run update-vscode && cd .."
116+
},
117+
__metadata = {
118+
id = "3a15b5a7-be12-47e3-8445-88ee3eabc8b2",
119+
publisherDisplayName = "sumneko",
120+
publisherId = "fb626675-24cf-4881-8c13-b465f29bec2f"
121+
}
122+
}
123+
124+
package.version = "0.9.2"
125+
126+
io.save(ROOT:parent_path() / 'package.json', json.encode(package))

server/test/main.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ ac = {}
1515

1616
require 'utility'
1717
require 'global_protect'
18+
require 'build_package'
1819

1920
local function main()
2021
local function test(name)

0 commit comments

Comments
 (0)