From e5e7d716a0c7db1dbb72cd5bfcbe59de43c759cb Mon Sep 17 00:00:00 2001 From: Nick Rodgers Date: Fri, 23 Dec 2022 18:57:53 -0700 Subject: feat(registry): add smithy-language-server (#795) --- lua/mason-core/installer/context.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lua/mason-core/installer/context.lua') diff --git a/lua/mason-core/installer/context.lua b/lua/mason-core/installer/context.lua index dd9b9617..132cc064 100644 --- a/lua/mason-core/installer/context.lua +++ b/lua/mason-core/installer/context.lua @@ -66,6 +66,12 @@ function ContextualFs:write_file(rel_path, contents) return fs.async.write_file(path.concat { self.cwd:get(), rel_path }, contents) end +---@async +---@param rel_path string The relative path from the current working directory to the file to read. +function ContextualFs:read_file(rel_path) + return fs.async.read_file(path.concat { self.cwd:get(), rel_path }) +end + ---@async ---@param rel_path string The relative path from the current working directory. function ContextualFs:file_exists(rel_path) -- cgit v1.2.3-70-g09d2