Selection of OS and small formatting

This commit is contained in:
Eduardo Cueto-Mendoza 2023-09-06 09:52:13 +01:00
parent 65c82b32f4
commit dac98dcd90
2 changed files with 82 additions and 59 deletions

View File

@ -1,8 +1,19 @@
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")
if (MY_OS == 'Linux')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'bashls',
'clangd',
'dockerls',
@ -13,6 +24,18 @@ lsp.ensure_installed({
'texlab',
'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_select = { behavior = cmp.SelectBehavior.Select }