aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/sources/file.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2025-05-19 05:58:01 +0200
committerGitHub <noreply@github.com>2025-05-19 05:58:01 +0200
commit3501b0f96d9f2f878b1947cf3614bc02d053a0c0 (patch)
tree5f9025e2df9652346fcd74b7186be1c5a6366367 /lua/mason-registry/sources/file.lua
parentfix(spawn): fix calling vim.fn when inside fast event loop on Windows (#1950) (diff)
downloadmason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.gz
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.bz2
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.lz
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.xz
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.tar.zst
mason-3501b0f96d9f2f878b1947cf3614bc02d053a0c0.zip
fix(registry): ensure there's no duplicate registry entries (#1957)
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