Can differentiate Linux by architecture
This commit is contained in:
parent
33e13ebba6
commit
8fdd515d06
|
@ -7,10 +7,30 @@ if (f ~= nil) then
|
||||||
f:close()
|
f:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local f = io.popen("uname -m")
|
||||||
|
if (f ~= nil) then
|
||||||
|
MY_ARCH = f:read("*a")
|
||||||
|
MY_ARCH = string.gsub(MY_ARCH, "%s+", "")
|
||||||
|
f:close()
|
||||||
|
end
|
||||||
|
|
||||||
lsp.preset("recommended")
|
lsp.preset("recommended")
|
||||||
|
|
||||||
if (MY_OS == 'Linux')
|
if (MY_OS == 'Linux')
|
||||||
then
|
then
|
||||||
|
if (MY_ARCH == 'aarch64')
|
||||||
|
then
|
||||||
|
lsp.ensure_installed({
|
||||||
|
-- Replace these with whatever servers you want to install
|
||||||
|
'bashls',
|
||||||
|
'julials',
|
||||||
|
'ltex',
|
||||||
|
'ocamllsp',
|
||||||
|
'pylsp',
|
||||||
|
'rust_analyzer',
|
||||||
|
'zls'
|
||||||
|
})
|
||||||
|
else
|
||||||
lsp.ensure_installed({
|
lsp.ensure_installed({
|
||||||
-- Replace these with whatever servers you want to install
|
-- Replace these with whatever servers you want to install
|
||||||
'bashls',
|
'bashls',
|
||||||
|
@ -23,6 +43,8 @@ then
|
||||||
'rust_analyzer',
|
'rust_analyzer',
|
||||||
'zls'
|
'zls'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
end
|
||||||
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
|
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
|
||||||
then
|
then
|
||||||
lsp.ensure_installed({
|
lsp.ensure_installed({
|
||||||
|
|
Loading…
Reference in New Issue