summaryrefslogtreecommitdiff
path: root/test/crossfile
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-15 17:11:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-15 17:11:11 +0800
commitac3235f4e9b800b0726a2e90555b109d5b58abfb (patch)
treedcf79c70ef825c7ac9462a93c86a782907a6c834 /test/crossfile
parent59b2b8eb9d0eadd5de1eabf366d8b99b63660719 (diff)
downloadlua-language-server-ac3235f4e9b800b0726a2e90555b109d5b58abfb.zip
fix hover
Diffstat (limited to 'test/crossfile')
-rw-r--r--test/crossfile/hover.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index 3c62b8f8..84276a27 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -1360,3 +1360,25 @@ local n: unknown
---
[here](command:xxxxx)]]
}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ ---@class A
+ ---@field x number # comments
+
+ ---@type A
+ local t
+
+ print(t.<?x?>)
+ ]]
+ },
+ hover = [[
+```lua
+(field) A.x: number
+```
+
+---
+ comments]]
+}