summaryrefslogtreecommitdiff
path: root/script/core/hover/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/hover/init.lua')
-rw-r--r--script/core/hover/init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/script/core/hover/init.lua b/script/core/hover/init.lua
index 61f09455..2051623c 100644
--- a/script/core/hover/init.lua
+++ b/script/core/hover/init.lua
@@ -6,6 +6,7 @@ local util = require 'utility'
local findSource = require 'core.find-source'
local markdown = require 'provider.markdown'
local guide = require 'parser.guide'
+local wssymbol = require 'core.workspace-symbol'
---@async
local function getHover(source)
@@ -14,6 +15,15 @@ local function getHover(source)
local labelMark = {}
local descMark = {}
+ if source.type == 'doc.see.name' then
+ for _, symbol in ipairs(wssymbol(source[1])) do
+ if symbol.name == source[1] then
+ source = symbol.source
+ break
+ end
+ end
+ end
+
---@async
local function addHover(def, checkLable, oop)
if defMark[def] then
@@ -111,6 +121,7 @@ local accept = {
['doc.enum.name'] = true,
['function'] = true,
['doc.module'] = true,
+ ['doc.see.name'] = true,
}
---@async