From d2ec0c0070c01ba0e3e8926031cfe848a016df44 Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 10 Sep 2021 13:38:39 +0200 Subject: rewrite some installers for broader cross-platform support (#85) - Remove all usage of zx in favour of native Lua (via libuv) - Introduce new set of `std` installers The following servers will have to be reinstalled due to this change: 1. clangd 2. solargraph 3. sumneko_lua 4. tailwindcss --- lua/nvim-lsp-installer/platform.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lua/nvim-lsp-installer/platform.lua') diff --git a/lua/nvim-lsp-installer/platform.lua b/lua/nvim-lsp-installer/platform.lua index 7a30bf47..7c754e45 100644 --- a/lua/nvim-lsp-installer/platform.lua +++ b/lua/nvim-lsp-installer/platform.lua @@ -1,6 +1,18 @@ local M = {} +local uname = vim.loop.os_uname() + +local arch_aliases = { + ["x86_64"] = "x64", +} + +M.arch = arch_aliases[uname.machine] or uname.machine + M.is_win = vim.fn.has "win32" == 1 M.is_unix = vim.fn.has "unix" == 1 +M.is_mac = vim.fn.has "mac" == 1 + +-- PATH separator +M.path_sep = M.is_win and ";" or ":" return M -- cgit v1.2.3-70-g09d2