summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/workspace/scope.lua8
-rw-r--r--script/workspace/workspace.lua4
2 files changed, 11 insertions, 1 deletions
diff --git a/script/workspace/scope.lua b/script/workspace/scope.lua
index 85190f25..a9e8447e 100644
--- a/script/workspace/scope.lua
+++ b/script/workspace/scope.lua
@@ -8,6 +8,14 @@
local mt = {}
mt.__index = mt
+function mt:__tostring()
+ if self.uri then
+ return ('{scope|%s|%s}'):format(self.type, self.uri)
+ else
+ return ('{scope|%s}'):format(self.type)
+ end
+end
+
---@param uri uri
function mt:addLink(uri)
self._links[uri] = true
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index 3676efb5..1867f70d 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -160,6 +160,7 @@ function m.getLibraryMatchers(scp)
if scp:get 'libraryMatcher' then
return scp:get 'libraryMatcher'
end
+ log.info('Build library matchers:', scp)
local librarys = {}
for path in pairs(config.get(scp.uri, 'Lua.workspace.library')) do
@@ -168,7 +169,7 @@ function m.getLibraryMatchers(scp)
librarys[m.normalize(path)] = true
end
end
- -- TODO
+ log.info('meta path:', scp:get 'metaPath')
if scp:get 'metaPath' then
librarys[m.normalize(scp:get 'metaPath')] = true
end
@@ -189,6 +190,7 @@ function m.getLibraryMatchers(scp)
end
scp:set('libraryMatcher', matchers)
+ log.debug('library matcher:', util.dump(matchers))
return matchers
end