From 08d074cd0c4d40e5b6033a67246f46072ecfe38e Mon Sep 17 00:00:00 2001 From: William Boman Date: Thu, 2 Mar 2023 02:26:52 +0100 Subject: feat(solang): also include $MASON/opt/solang llvm bins (#164) This will be the new location of LLVM-patched bins once https://github.com/mason-org/mason-registry/ is live. --- lua/mason-lspconfig/server_configurations/solang/init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lua') diff --git a/lua/mason-lspconfig/server_configurations/solang/init.lua b/lua/mason-lspconfig/server_configurations/solang/init.lua index a8678af..6dcc7a1 100644 --- a/lua/mason-lspconfig/server_configurations/solang/init.lua +++ b/lua/mason-lspconfig/server_configurations/solang/init.lua @@ -3,11 +3,13 @@ local process = require "mason-core.process" ---@param install_dir string return function(install_dir) + local llvm_bins = { vim.fn.expand(path.concat { install_dir, "llvm*", "bin" }, true, true)[1] } + if vim.env.MASON then + table.insert(llvm_bins, vim.fn.expand "$MASON/opt/solang/llvm15.0/bin") + end return { cmd_env = { - PATH = process.extend_path { - vim.fn.expand(path.concat { install_dir, "llvm*", "bin" }, true, true)[1], - }, + PATH = process.extend_path(llvm_bins), }, } end -- cgit v1.2.3-70-g09d2