Configured for MacOS

This commit is contained in:
Eduardo Cueto-Mendoza 2024-04-24 13:09:50 +01:00
parent 762cbfa042
commit f5d54abb9d
1 changed files with 71 additions and 1 deletions

View File

@ -29,6 +29,17 @@ then
'bashls',
'pylsp'
})
elseif (MY_OS == 'Darwin')
then
lsp.ensure_installed({
-- Replace these with whatever servers you want to install
'clangd',
'julials',
'lua_ls',
'pylsp',
'rust_analyzer',
'zls'
})
else
print('Should never be here')
end
@ -112,6 +123,8 @@ then
},
})
require'lspconfig'.pylsp.setup{}
require('lspconfig').rust_analyzer.setup({
settings = {
["rust-analyzer"] = {
@ -131,6 +144,8 @@ then
require('lspconfig').clangd.setup({})
require'lspconfig'.pylsp.setup{}
require('lspconfig').rust_analyzer.setup({
settings = {
["rust-analyzer"] = {
@ -145,7 +160,62 @@ then
elseif (MY_OS == 'Darwin')
then
print('Should configure MacOS')
-- Installed for Linux
require('lspconfig').clangd.setup({})
--require('lspconfig').gopls.setup({})
require('lspconfig').julials.setup({})
--require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
require('lspconfig').lua_ls.setup({
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { 'vim' },
neededFileStatus = {
["codestyle-check"] = "Any",
},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
format = {
enable = true,
-- Put format options here
-- NOTE: the value should be STRING!!
defaultConfig = {
indent_style = "space",
indent_size = "4",
}
},
},
},
})
require'lspconfig'.pylsp.setup{}
require('lspconfig').rust_analyzer.setup({
settings = {
["rust-analyzer"] = {
diagnostics = {
enable = false;
}
}
}
})
require('lspconfig').zls.setup({})
else
print('Should never be here')
end