From ca2385a3d2d7ccf0256c415f4b3d5daf0777c876 Mon Sep 17 00:00:00 2001 From: William Boman Date: Wed, 13 Jul 2022 00:56:26 +0200 Subject: feat: add more wrapper executables for packages that don't provide one (#63) --- lua/mason-registry/rescript-lsp/init.lua | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'lua/mason-registry/rescript-lsp/init.lua') diff --git a/lua/mason-registry/rescript-lsp/init.lua b/lua/mason-registry/rescript-lsp/init.lua index 482b0b87..ec79ab09 100644 --- a/lua/mason-registry/rescript-lsp/init.lua +++ b/lua/mason-registry/rescript-lsp/init.lua @@ -1,5 +1,6 @@ local Pkg = require "mason-core.package" local github = require "mason-core.managers.github" +local path = require "mason-core.path" return Pkg.new { name = "rescript-lsp", @@ -8,7 +9,8 @@ return Pkg.new { languages = { Pkg.Lang.ReScript }, categories = { Pkg.Cat.LSP }, ---@async - install = function() + ---@param ctx InstallContext + install = function(ctx) github .unzip_release_file({ repo = "rescript-lang/rescript-vscode", @@ -17,5 +19,18 @@ return Pkg.new { end, }) .with_receipt() + + ctx:link_bin( + "rescript-lsp", + ctx:write_node_exec_wrapper( + "rescript-lsp", + path.concat { + "extension", + "server", + "out", + "server.js", + } + ) + ) end, } -- cgit v1.2.3-70-g09d2