diff options
Diffstat (limited to 'script/core/hover')
-rw-r--r-- | script/core/hover/arg.lua | 4 | ||||
-rw-r--r-- | script/core/hover/description.lua | 8 | ||||
-rw-r--r-- | script/core/hover/init.lua | 4 | ||||
-rw-r--r-- | script/core/hover/label.lua | 8 | ||||
-rw-r--r-- | script/core/hover/name.lua | 16 | ||||
-rw-r--r-- | script/core/hover/return.lua | 4 | ||||
-rw-r--r-- | script/core/hover/table.lua | 10 |
7 files changed, 27 insertions, 27 deletions
diff --git a/script/core/hover/arg.lua b/script/core/hover/arg.lua index 324d28af..b8c9eba0 100644 --- a/script/core/hover/arg.lua +++ b/script/core/hover/arg.lua @@ -1,4 +1,4 @@ -local guide = require 'core.guide' +local searcher = require 'core.searcher' local vm = require 'vm' local function optionalArg(arg) @@ -29,7 +29,7 @@ local function asFunction(source, oop) if arg.dummy then goto CONTINUE end - local name = arg.name or guide.getKeyName(arg) + local name = arg.name or searcher.getKeyName(arg) if name then args[#args+1] = ('%s%s: %s'):format( name, diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua index 401ca5a7..85224c66 100644 --- a/script/core/hover/description.lua +++ b/script/core/hover/description.lua @@ -2,7 +2,7 @@ local vm = require 'vm' local ws = require 'workspace' local furi = require 'file-uri' local files = require 'files' -local guide = require 'core.guide' +local searcher = require 'core.searcher' local markdown = require 'provider.markdown' local config = require 'config' local lang = require 'language' @@ -72,7 +72,7 @@ local function asStringView(source, literal) end local function asString(source) - local literal = guide.getLiteral(source) + local literal = searcher.getLiteral(source) if type(literal) ~= 'string' then return nil end @@ -127,7 +127,7 @@ local function tryDocClassComment(source) for _, def in ipairs(vm.getDefs(source, 0)) do if def.type == 'doc.class.name' or def.type == 'doc.alias.name' then - local class = guide.getDocState(def) + local class = searcher.getDocState(def) local comment = getBindComment(class, class.bindGroup, class) if comment then return comment @@ -180,7 +180,7 @@ local function isFunction(source) if source.type == 'function' then return true end - local value = guide.getObjectValue(source) + local value = searcher.getObjectValue(source) if not value then return false end diff --git a/script/core/hover/init.lua b/script/core/hover/init.lua index 81285ef2..86c5b992 100644 --- a/script/core/hover/init.lua +++ b/script/core/hover/init.lua @@ -1,5 +1,5 @@ local files = require 'files' -local guide = require 'core.guide' +local searcher = require 'core.searcher' local vm = require 'vm' local getLabel = require 'core.hover.label' local getDesc = require 'core.hover.description' @@ -48,7 +48,7 @@ local function getHoverAsFunction(source) local other = 0 local mark = {} for _, def in ipairs(values) do - def = guide.getObjectValue(def) or def + def = searcher.getObjectValue(def) or def if def.type == 'function' or def.type == 'doc.type.function' then eachFunctionAndOverload(def, function (value) diff --git a/script/core/hover/label.lua b/script/core/hover/label.lua index d93b14e3..da07200f 100644 --- a/script/core/hover/label.lua +++ b/script/core/hover/label.lua @@ -4,7 +4,7 @@ local buildReturn = require 'core.hover.return' local buildTable = require 'core.hover.table' local vm = require 'vm' local util = require 'utility' -local guide = require 'core.guide' +local searcher = require 'core.searcher' local lang = require 'language' local config = require 'config' local files = require 'files' @@ -139,13 +139,13 @@ local function asDocField(source) if not class then return ('field ?.%s: %s'):format( name, - guide.viewInferType(infers) + searcher.viewInferType(infers) ) end return ('field %s.%s: %s'):format( class.class[1], name, - guide.viewInferType(infers) + searcher.viewInferType(infers) ) end @@ -177,7 +177,7 @@ local function asNumber(source) if type(num) ~= 'number' then return nil end - local uri = guide.getUri(source) + local uri = searcher.getUri(source) local text = files.getText(uri) if not text then return nil diff --git a/script/core/hover/name.lua b/script/core/hover/name.lua index d583f1e1..fe0f2ffb 100644 --- a/script/core/hover/name.lua +++ b/script/core/hover/name.lua @@ -1,10 +1,10 @@ -local guide = require 'core.guide' +local searcher = require 'core.searcher' local vm = require 'vm' local buildName local function asLocal(source) - local name = guide.getKeyName(source) + local name = searcher.getKeyName(source) if not source.attrs then return name end @@ -21,8 +21,8 @@ local function asField(source, oop) if source.node.type ~= 'getglobal' then class = vm.getClass(source.node, 0) end - local node = class or guide.getKeyName(source.node) or '?' - local method = guide.getKeyName(source) + local node = class or searcher.getKeyName(source.node) or '?' + local method = searcher.getKeyName(source) if oop then return ('%s:%s'):format(node, method) else @@ -34,16 +34,16 @@ local function asTableField(source) if not source.field then return end - return guide.getKeyName(source.field) + return searcher.getKeyName(source.field) end local function asGlobal(source) - return guide.getKeyName(source) + return searcher.getKeyName(source) end local function asDocFunction(source) - local doc = guide.getParentType(source, 'doc.type') - or guide.getParentType(source, 'doc.overload') + local doc = searcher.getParentType(source, 'doc.type') + or searcher.getParentType(source, 'doc.overload') if not doc or not doc.bindSources then return '' end diff --git a/script/core/hover/return.lua b/script/core/hover/return.lua index c3e9656d..0825e77d 100644 --- a/script/core/hover/return.lua +++ b/script/core/hover/return.lua @@ -1,11 +1,11 @@ -local guide = require 'core.guide' +local searcher = require 'core.searcher' local vm = require 'vm' local function mergeTypes(returns) if type(returns) == 'string' then return returns end - return guide.mergeTypes(returns) + return searcher.mergeTypes(returns) end local function getReturnDualByDoc(source) diff --git a/script/core/hover/table.lua b/script/core/hover/table.lua index edb7751b..137c4f6b 100644 --- a/script/core/hover/table.lua +++ b/script/core/hover/table.lua @@ -1,6 +1,6 @@ local vm = require 'vm' local util = require 'utility' -local guide = require 'core.guide' +local searcher = require 'core.searcher' local config = require 'config' local lang = require 'language' @@ -20,7 +20,7 @@ local function getKey(src) end return '[any]' end - if guide.getKeyType(src) == 'string' then + if searcher.getKeyType(src) == 'string' then if key:match '^[%a_][%w_]*$' then return key else @@ -31,7 +31,7 @@ local function getKey(src) end local function getFieldFull(src) - local value = guide.getObjectValue(src) or src + local value = searcher.getObjectValue(src) or src local tp = vm.getInferType(value, 0) --local class = vm.getClass(src) local literal = vm.getInferLiteral(value) @@ -45,7 +45,7 @@ local function getFieldFast(src) if src.bindDocs then return getFieldFull(src) end - local value = guide.getObjectValue(src) or src + local value = searcher.getObjectValue(src) or src if not value then return 'any' end @@ -193,7 +193,7 @@ local function mergeTypes(types) end end end - return guide.mergeTypes(results) + return searcher.mergeTypes(results) end local function clearClasses(classes) |