aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/sources/file.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/mason-registry/sources/file.lua')
-rw-r--r--lua/mason-registry/sources/file.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/mason-registry/sources/file.lua b/lua/mason-registry/sources/file.lua
index 34c855c0..663efaaa 100644
--- a/lua/mason-registry/sources/file.lua
+++ b/lua/mason-registry/sources/file.lua
@@ -189,6 +189,11 @@ function FileRegistrySource:serialize()
}
end
+---@param other FileRegistrySource
+function FileRegistrySource:is_same_location(other)
+ return vim.fn.expand(self.spec.path) == vim.fn.expand(other.spec.path)
+end
+
function FileRegistrySource:__tostring()
return ("FileRegistrySource(path=%s)"):format(self.spec.path)
end