summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-28 20:09:43 +0800
committersumneko <sumneko@hotmail.com>2019-04-28 20:09:43 +0800
commit0bc67627a4409a08e34be0b44cba928cdacf8192 (patch)
treea78bf45ded637b3a6424653745895b6c327cb578 /server/test
parentb4ed749782ba58140c8d7878e4b27ec6b3d2fffb (diff)
downloadlua-language-server-0bc67627a4409a08e34be0b44cba928cdacf8192.zip
emmy.field
Diffstat (limited to 'server/test')
-rw-r--r--server/test/completion/init.lua18
-rw-r--r--server/test/definition/emmy.lua8
2 files changed, 26 insertions, 0 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index 9d8477f7..7d0d1d04 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -1010,3 +1010,21 @@ end
kind = CompletionItemKind.Keyword,
}
}
+
+TEST [[
+---@class Class
+---@field name string
+---@field id integer
+local mt = {}
+mt.$
+]]
+{
+ {
+ label = 'id',
+ kind = CompletionItemKind.Field,
+ },
+ {
+ label = 'name',
+ kind = CompletionItemKind.Field,
+ },
+}
diff --git a/server/test/definition/emmy.lua b/server/test/definition/emmy.lua
index 7b5110c7..937f1d70 100644
--- a/server/test/definition/emmy.lua
+++ b/server/test/definition/emmy.lua
@@ -71,3 +71,11 @@ TEST [[
---@class <!Class!>
---@param a <?Class?>
]]
+
+TEST [[
+---@class Class
+---@field <!name!> string
+---@field id integer
+local mt = {}
+mt.<?name?>
+]]