diff options
| author | William Boman <william@redwill.se> | 2023-10-13 21:14:29 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2025-02-19 09:23:19 +0100 |
| commit | ae208dc380808ff1aef39929a0e897e881571d43 (patch) | |
| tree | b9044cec7223062db69998189c76f8163ac9d58b /lua/mason-registry/sources/file.lua | |
| parent | fix(location): use correct registry path (diff) | |
| download | mason-ae208dc380808ff1aef39929a0e897e881571d43.tar mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.gz mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.bz2 mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.lz mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.xz mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.zst mason-ae208dc380808ff1aef39929a0e897e881571d43.zip | |
refactor: standardize constructors and improve inheritance construction
Diffstat (limited to 'lua/mason-registry/sources/file.lua')
| -rw-r--r-- | lua/mason-registry/sources/file.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lua/mason-registry/sources/file.lua b/lua/mason-registry/sources/file.lua index bb53c28d..628b1253 100644 --- a/lua/mason-registry/sources/file.lua +++ b/lua/mason-registry/sources/file.lua @@ -23,10 +23,12 @@ local FileRegistrySource = {} FileRegistrySource.__index = FileRegistrySource ---@param spec FileRegistrySourceSpec -function FileRegistrySource.new(spec) - return setmetatable({ - spec = spec, - }, FileRegistrySource) +function FileRegistrySource:new(spec) + ---@type FileRegistrySource + local instance = {} + setmetatable(instance, self) + instance.spec = spec + return instance end function FileRegistrySource:is_installed() |
