summaryrefslogtreecommitdiff
path: root/server/libs
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-17 14:42:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-17 14:42:11 +0800
commit5c6166c11a8ac9533aefb78890f359c1abf3ccbf (patch)
tree890e9e24ddd3e61a4ce6b68ae3ef9c8553ac7372 /server/libs
parent03d281fc3b7a09321143a69f5b1a33984c4c2a1c (diff)
downloadlua-language-server-5c6166c11a8ac9533aefb78890f359c1abf3ccbf.zip
更新库
Diffstat (limited to 'server/libs')
-rw-r--r--server/libs/lua53/basic.lni7
-rw-r--r--server/libs/lua53/modules.lni8
-rw-r--r--server/libs/lua53/os.lni148
-rw-r--r--server/libs/lua53/package.lni60
4 files changed, 214 insertions, 9 deletions
diff --git a/server/libs/lua53/basic.lni b/server/libs/lua53/basic.lni
index d54e6c96..45d3aad3 100644
--- a/server/libs/lua53/basic.lni
+++ b/server/libs/lua53/basic.lni
@@ -338,3 +338,10 @@ type = 'boolean'
name = 'result'
[[.returns]]
type = '...'
+
+[require]
+special = 'require'
+[[.args]]
+name = 'modname'
+type = 'string'
+[[.returns]]
diff --git a/server/libs/lua53/modules.lni b/server/libs/lua53/modules.lni
deleted file mode 100644
index 0fa9b7c2..00000000
--- a/server/libs/lua53/modules.lni
+++ /dev/null
@@ -1,8 +0,0 @@
-<default>
-type = 'function'
-
-[require]
-special = 'require'
-
-[package]
-type = 'table'
diff --git a/server/libs/lua53/os.lni b/server/libs/lua53/os.lni
index 1a887f83..e889bf2a 100644
--- a/server/libs/lua53/os.lni
+++ b/server/libs/lua53/os.lni
@@ -1,5 +1,151 @@
+[os]
+type = 'table'
+[[.source]]
+type = 'global'
+[[.source]]
+type = 'library'
+name = 'os'
+
<default>
type = 'function'
+[[.parent]]
+type = 'global'
+name = 'os'
+[[.parent]]
+type = 'library'
+name = 'os'
-[os]
+[clock]
+[[.returns]]
+type = 'number'
+
+[data]
+[[.args]]
+name = 'format'
+type = 'string'
+optional = 'after'
+[[.args]]
+name = 'time'
+type = 'integer'
+optional = 'self'
+[[.returns]]
+type = 'string'
+
+[difftime]
+[[.args]]
+name = 't2'
+type = 'integer'
+[[.args]]
+name = 't1'
+type = 'integer'
+[[.returns]]
+type = 'integer'
+
+[execute]
+[[.args]]
+name = 'command'
+type = 'string'
+optional = 'self'
+[[.returns]]
+name = 'suc'
+type = 'boolean'
+default = 'true'
+optional = 'after'
+[[.returns]]
+name = 'type'
+type = 'string'
+[[.returns]]
+name = 'code'
+[[.enums]]
+type = 'type'
+enum = 'exit'
+[[.enums]]
+type = 'type'
+enum = 'signal'
+
+[exit]
+[[.args]]
+name = 'code'
+type = {'boolean', 'integer'}
+optional = 'after'
+default = true
+[[.args]]
+name = 'close'
+type = 'boolean'
+optional = 'self'
+
+[getenv]
+[[.args]]
+name = 'varname'
+type = 'string'
+[[.returns]]
+type = 'string'
+
+[remove]
+[[.args]]
+name = 'filename'
+type = 'string'
+[[.returns]]
+name = 'suc'
+type = 'boolean'
+[[.returns]]
+name = 'errmsg'
+type = 'string'
+optional = 'self'
+
+[rename]
+[[.args]]
+name = 'oldname'
+type = 'string'
+[[.args]]
+name = 'newname'
+type = 'string'
+[[.returns]]
+name = 'suc'
+type = 'boolean'
+[[.returns]]
+name = 'errmsg'
+type = 'string'
+optional = 'self'
+
+[setlocale]
+[[.args]]
+name = 'locale'
+type = 'string'
+[[.args]]
+name = 'category'
+type = 'string'
+optional = 'self'
+default = 'all'
+[[.returns]]
+name = 'locale'
+type = 'string'
+[[.enums]]
+name = 'category'
+enum = 'all'
+[[.enums]]
+name = 'category'
+enum = 'collate'
+[[.enums]]
+name = 'category'
+enum = 'ctype'
+[[.enums]]
+name = 'category'
+enum = 'monetary'
+[[.enums]]
+name = 'category'
+enum = 'numeric'
+[[.enums]]
+name = 'category'
+enum = 'time'
+
+[time]
+[[.args]]
type = 'table'
+optional = 'self'
+[[.returns]]
+type = 'integer'
+
+[tmpname]
+[[.returns]]
+type = 'string'
diff --git a/server/libs/lua53/package.lni b/server/libs/lua53/package.lni
new file mode 100644
index 00000000..62ab4545
--- /dev/null
+++ b/server/libs/lua53/package.lni
@@ -0,0 +1,60 @@
+[package]
+type = 'table'
+[[.source]]
+type = 'global'
+[[.source]]
+type = 'library'
+name = 'package'
+
+<default>
+type = 'function'
+[[.parent]]
+type = 'global'
+name = 'package'
+[[.parent]]
+type = 'library'
+name = 'package'
+
+[config]
+type = 'string'
+
+[cpath]
+type = 'string'
+
+[loaded]
+type = 'table'
+
+[loadlib]
+[[.args]]
+name = 'libname'
+type = 'string'
+[[.args]]
+name = 'funcname'
+type = 'string'
+[[.returns]]
+
+[path]
+type = 'string'
+
+[preload]
+type = 'table'
+
+[searchers]
+type = 'table'
+
+[searchpath]
+[[.args]]
+name = 'name'
+type = 'string'
+[[.args]]
+name = 'path'
+type = 'string'
+[[.args]]
+name = 'sep'
+type = 'string'
+optional = 'after'
+default = '.'
+[[.args]]
+name = 'rep'
+type = 'string'
+optional = 'self'