summaryrefslogtreecommitdiff
path: root/meta/template
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-16 21:06:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-16 21:06:06 +0800
commit5aaecf51b9fccddf52ed3e4749757a03819fae61 (patch)
tree87ceb62c6eb926cb54d8ba794697f0d3ddd0b1e3 /meta/template
parenta6798e6adb81da6b7f833bc39da0a6368178a090 (diff)
downloadlua-language-server-5aaecf51b9fccddf52ed3e4749757a03819fae61.zip
support `---@meta [name]`
once declared `name`, user can only require this file by declared name meta file can not be required with name `_`
Diffstat (limited to 'meta/template')
-rw-r--r--meta/template/basic.lua2
-rw-r--r--meta/template/bit.lua2
-rw-r--r--meta/template/bit32.lua2
-rw-r--r--meta/template/builtin.lua2
-rw-r--r--meta/template/coroutine.lua2
-rw-r--r--meta/template/debug.lua2
-rw-r--r--meta/template/ffi.lua2
-rw-r--r--meta/template/io.lua2
-rw-r--r--meta/template/jit.lua2
-rw-r--r--meta/template/math.lua2
-rw-r--r--meta/template/os.lua2
-rw-r--r--meta/template/package.lua2
-rw-r--r--meta/template/string.buffer.lua2
-rw-r--r--meta/template/string.lua2
-rw-r--r--meta/template/table.clear.lua4
-rw-r--r--meta/template/table.lua2
-rw-r--r--meta/template/table.new.lua4
-rw-r--r--meta/template/utf8.lua2
18 files changed, 20 insertions, 20 deletions
diff --git a/meta/template/basic.lua b/meta/template/basic.lua
index 9b6210e1..f3ebae94 100644
--- a/meta/template/basic.lua
+++ b/meta/template/basic.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta _
---#DES 'arg'
---@type string[]
diff --git a/meta/template/bit.lua b/meta/template/bit.lua
index 369c5f9d..c9563f42 100644
--- a/meta/template/bit.lua
+++ b/meta/template/bit.lua
@@ -1,5 +1,5 @@
---#if not JIT then DISABLE() end
----@meta
+---@meta bit
---@version JIT
---@class bitlib
diff --git a/meta/template/bit32.lua b/meta/template/bit32.lua
index bcb39c66..ddccbab4 100644
--- a/meta/template/bit32.lua
+++ b/meta/template/bit32.lua
@@ -1,5 +1,5 @@
---#if VERSION ~= 5.2 then DISABLE() end
----@meta
+---@meta bit32
---@version 5.2
---#DES 'bit32'
diff --git a/meta/template/builtin.lua b/meta/template/builtin.lua
index 41858096..466a0966 100644
--- a/meta/template/builtin.lua
+++ b/meta/template/builtin.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta _
---@class unknown
---@class any
diff --git a/meta/template/coroutine.lua b/meta/template/coroutine.lua
index e807f357..b3890bfd 100644
--- a/meta/template/coroutine.lua
+++ b/meta/template/coroutine.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta coroutine
---#DES 'coroutine'
---@class coroutinelib
diff --git a/meta/template/debug.lua b/meta/template/debug.lua
index 48ba52d9..e7ac5911 100644
--- a/meta/template/debug.lua
+++ b/meta/template/debug.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta debug
---#DES 'debug'
---@class debuglib
diff --git a/meta/template/ffi.lua b/meta/template/ffi.lua
index 2ca83dd5..a9d48657 100644
--- a/meta/template/ffi.lua
+++ b/meta/template/ffi.lua
@@ -1,5 +1,5 @@
---#if not JIT then DISABLE() end
----@meta
+---@meta ffi
---@class ffi.namespace*: table
---@field [string] function
diff --git a/meta/template/io.lua b/meta/template/io.lua
index d685128b..a3420479 100644
--- a/meta/template/io.lua
+++ b/meta/template/io.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta io
---#DES 'io'
---@class iolib
diff --git a/meta/template/jit.lua b/meta/template/jit.lua
index d1684a04..dae996b5 100644
--- a/meta/template/jit.lua
+++ b/meta/template/jit.lua
@@ -1,5 +1,5 @@
---#if not JIT then DISABLE() end
----@meta
+---@meta jit
---@version JIT
---@class jitlib
diff --git a/meta/template/math.lua b/meta/template/math.lua
index 218a15ac..07917a2b 100644
--- a/meta/template/math.lua
+++ b/meta/template/math.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta math
---#DES 'math'
---@class mathlib
diff --git a/meta/template/os.lua b/meta/template/os.lua
index fbe37891..fbc56ac1 100644
--- a/meta/template/os.lua
+++ b/meta/template/os.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta os
---#DES 'os'
---@class oslib
diff --git a/meta/template/package.lua b/meta/template/package.lua
index 5c08bbef..3845e769 100644
--- a/meta/template/package.lua
+++ b/meta/template/package.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta package
---#if VERSION >=5.4 then
---#DES 'require>5.4'
diff --git a/meta/template/string.buffer.lua b/meta/template/string.buffer.lua
index ee57a1ad..7285290a 100644
--- a/meta/template/string.buffer.lua
+++ b/meta/template/string.buffer.lua
@@ -1,5 +1,5 @@
---#if not JIT then DISABLE() end
----@meta
+---@meta string.buffer
---@version JIT
--- The string buffer library allows high-performance manipulation of string-like data.
diff --git a/meta/template/string.lua b/meta/template/string.lua
index c68e1117..cf83104b 100644
--- a/meta/template/string.lua
+++ b/meta/template/string.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta string
---#DES 'string'
---@class stringlib
diff --git a/meta/template/table.clear.lua b/meta/template/table.clear.lua
index dffed5fa..122e3651 100644
--- a/meta/template/table.clear.lua
+++ b/meta/template/table.clear.lua
@@ -1,9 +1,9 @@
---#if not JIT then DISABLE() end
----@meta
+---@meta table.clear
---@version JIT
---#DES 'table.clear'
---@param tab table
local function clear(tab) end
-return clear \ No newline at end of file
+return clear
diff --git a/meta/template/table.lua b/meta/template/table.lua
index 90efde00..40ba0ac1 100644
--- a/meta/template/table.lua
+++ b/meta/template/table.lua
@@ -1,4 +1,4 @@
----@meta
+---@meta table
---#DES 'table'
---@class tablelib
diff --git a/meta/template/table.new.lua b/meta/template/table.new.lua
index 398bc9f9..f4b05cdc 100644
--- a/meta/template/table.new.lua
+++ b/meta/template/table.new.lua
@@ -1,5 +1,5 @@
---#if not JIT then DISABLE() end
----@meta
+---@meta table.new
---@version JIT
---#DES 'table.new'
@@ -8,4 +8,4 @@
---@return table
local function new(narray, nhash) end
-return new \ No newline at end of file
+return new
diff --git a/meta/template/utf8.lua b/meta/template/utf8.lua
index cccee99a..5c766838 100644
--- a/meta/template/utf8.lua
+++ b/meta/template/utf8.lua
@@ -1,5 +1,5 @@
---#if VERSION <= 5.2 then DISABLE() end
----@meta
+---@meta utf8
---@version >5.3
---#DES 'utf8'