Adding C/C++ debugging

This commit is contained in:
Eduardo Cueto-Mendoza 2024-09-25 12:49:53 +01:00
parent 781856e48d
commit b17ba11591
2 changed files with 12 additions and 6 deletions

View File

@ -28,20 +28,19 @@ then
'ocamllsp', 'ocamllsp',
'pylsp', 'pylsp',
'rust_analyzer', 'rust_analyzer',
'zls'
}) })
else 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',
'clangd', 'clangd',
'cmake',
'julials', 'julials',
'lua_ls', 'lua_ls',
'ltex', 'ltex',
'ocamllsp', 'ocamllsp',
'pylsp', 'pylsp',
'rust_analyzer', 'rust_analyzer',
'zls'
}) })
end end
@ -58,13 +57,13 @@ then
lsp.ensure_installed({ lsp.ensure_installed({
-- Replace these with whatever servers you want to install -- Replace these with whatever servers you want to install
'clangd', 'clangd',
'cmake',
'julials', 'julials',
'lua_ls', 'lua_ls',
'ltex', 'ltex',
'ocamllsp', 'ocamllsp',
'pylsp', 'pylsp',
'rust_analyzer', 'rust_analyzer',
'zls'
}) })
else else
print('Should never be here LSP') print('Should never be here LSP')
@ -113,6 +112,8 @@ then
require('lspconfig').clangd.setup({}) require('lspconfig').clangd.setup({})
require('lspconfig').cmake.setup({})
--require('lspconfig').gopls.setup({}) --require('lspconfig').gopls.setup({})
require('lspconfig').julials.setup({}) require('lspconfig').julials.setup({})
@ -209,7 +210,6 @@ then
} }
}) })
require('lspconfig').zls.setup({})
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD') elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
then then
@ -218,6 +218,8 @@ then
require('lspconfig').clangd.setup({}) require('lspconfig').clangd.setup({})
require('lspconfig').cmake.setup({})
require('lspconfig').ocamllsp.setup({}) require('lspconfig').ocamllsp.setup({})
require('lspconfig').pylsp.setup { require('lspconfig').pylsp.setup {
@ -256,13 +258,14 @@ then
} }
}) })
require('lspconfig').zls.setup({})
elseif (MY_OS == 'Darwin') elseif (MY_OS == 'Darwin')
then then
-- Installed for Linux -- Installed for Linux
require('lspconfig').clangd.setup({}) require('lspconfig').clangd.setup({})
require('lspconfig').cmake.setup({})
--require('lspconfig').gopls.setup({}) --require('lspconfig').gopls.setup({})
require('lspconfig').julials.setup({}) require('lspconfig').julials.setup({})
@ -359,7 +362,6 @@ then
} }
}) })
require('lspconfig').zls.setup({})
else else
print('Should never be here LSP config') print('Should never be here LSP config')
end end

View File

@ -180,6 +180,10 @@ local plugins = {
end, end,
opts = {} opts = {}
}, },
-- C/C++ debbuging
{
'sakhnik/nvim-gdb',
},
} }
require('lazy').setup(plugins, { require('lazy').setup(plugins, {