Selection of OS and small formatting
This commit is contained in:
parent
65c82b32f4
commit
dac98dcd90
|
@ -1,8 +1,19 @@
|
||||||
local lsp = require('lsp-zero')
|
local lsp = require('lsp-zero')
|
||||||
|
|
||||||
|
local f = io.popen("uname -s")
|
||||||
|
if (f ~= nil) then
|
||||||
|
MY_OS = f:read("*a")
|
||||||
|
MY_OS = string.gsub(MY_OS, "%s+", "")
|
||||||
|
f:close()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
lsp.preset("recommended")
|
lsp.preset("recommended")
|
||||||
|
|
||||||
|
if (MY_OS == 'Linux')
|
||||||
|
then
|
||||||
lsp.ensure_installed({
|
lsp.ensure_installed({
|
||||||
|
-- Replace these with whatever servers you want to install
|
||||||
'bashls',
|
'bashls',
|
||||||
'clangd',
|
'clangd',
|
||||||
'dockerls',
|
'dockerls',
|
||||||
|
@ -13,6 +24,18 @@ lsp.ensure_installed({
|
||||||
'texlab',
|
'texlab',
|
||||||
'zls'
|
'zls'
|
||||||
})
|
})
|
||||||
|
elseif (MY_OS == 'FreeBSD')
|
||||||
|
then
|
||||||
|
lsp.ensure_installed({
|
||||||
|
-- Replace these with whatever servers you want to install
|
||||||
|
'bashls',
|
||||||
|
'dockerls',
|
||||||
|
'julials',
|
||||||
|
'pylsp',
|
||||||
|
})
|
||||||
|
else
|
||||||
|
print('Should never be here')
|
||||||
|
end
|
||||||
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||||
|
|
Loading…
Reference in New Issue