summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script-beta/core/hover/description.lua4
-rw-r--r--test-beta/crossfile/hover.lua16
2 files changed, 10 insertions, 10 deletions
diff --git a/script-beta/core/hover/description.lua b/script-beta/core/hover/description.lua
index 31d5bf58..3f39d959 100644
--- a/script-beta/core/hover/description.lua
+++ b/script-beta/core/hover/description.lua
@@ -207,8 +207,8 @@ local function buildEnumChunk(docType, name)
local lines = {}
lines[#lines+1] = ('%s: %s'):format(name, table.concat(types))
for _, enum in ipairs(enums) do
- lines[#lines+1] = (' |%s%s%s'):format(
- enum.default and '>' or ' ',
+ lines[#lines+1] = (' %s %s%s'):format(
+ enum.default and '->' or ' |',
enum[1],
enum.comment and (' -- %s'):format(enum.comment) or ''
)
diff --git a/test-beta/crossfile/hover.lua b/test-beta/crossfile/hover.lua
index fd11481d..9fc21461 100644
--- a/test-beta/crossfile/hover.lua
+++ b/test-beta/crossfile/hover.lua
@@ -314,8 +314,8 @@ TEST {
description = [[
```lua
x: string
- | '选项1' -- 注释1
- |>'选项2' -- 注释2
+ | '选项1' -- 注释1
+ -> '选项2' -- 注释2
```]]
}
}
@@ -341,8 +341,8 @@ TEST {
description = [[
```lua
x: option
- | '选项1' -- 注释1
- |>'选项2' -- 注释2
+ | '选项1' -- 注释1
+ -> '选项2' -- 注释2
```]]
}
}
@@ -370,8 +370,8 @@ function f()
description = [[
```lua
x: option
- | '选项1' -- 注释1
- |>'选项2' -- 注释2
+ | '选项1' -- 注释1
+ -> '选项2' -- 注释2
```]]
}
}
@@ -399,8 +399,8 @@ function f()
description = [[
```lua
(return 1): option
- | '选项1' -- 注释1
- |>'选项2' -- 注释2
+ | '选项1' -- 注释1
+ -> '选项2' -- 注释2
```]]
}
}