From b17ba1159181f7b29e9b616792a5fd68ec52c099 Mon Sep 17 00:00:00 2001 From: Eduardo Cueto-Mendoza Date: Wed, 25 Sep 2024 12:49:53 +0100 Subject: [PATCH] Adding C/C++ debugging --- after/plugin/lsp.lua | 14 ++++++++------ lua/eddie/lazy.lua | 4 ++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index be96dd5..a0dd98a 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -28,20 +28,19 @@ then 'ocamllsp', 'pylsp', 'rust_analyzer', - 'zls' }) else lsp.ensure_installed({ -- Replace these with whatever servers you want to install 'bashls', 'clangd', + 'cmake', 'julials', 'lua_ls', 'ltex', 'ocamllsp', 'pylsp', 'rust_analyzer', - 'zls' }) end @@ -58,13 +57,13 @@ then lsp.ensure_installed({ -- Replace these with whatever servers you want to install 'clangd', + 'cmake', 'julials', 'lua_ls', 'ltex', 'ocamllsp', 'pylsp', 'rust_analyzer', - 'zls' }) else print('Should never be here LSP') @@ -113,6 +112,8 @@ then require('lspconfig').clangd.setup({}) + require('lspconfig').cmake.setup({}) + --require('lspconfig').gopls.setup({}) require('lspconfig').julials.setup({}) @@ -209,7 +210,6 @@ then } }) - require('lspconfig').zls.setup({}) elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD') then @@ -218,6 +218,8 @@ then require('lspconfig').clangd.setup({}) + require('lspconfig').cmake.setup({}) + require('lspconfig').ocamllsp.setup({}) require('lspconfig').pylsp.setup { @@ -256,13 +258,14 @@ then } }) - require('lspconfig').zls.setup({}) elseif (MY_OS == 'Darwin') then -- Installed for Linux require('lspconfig').clangd.setup({}) + require('lspconfig').cmake.setup({}) + --require('lspconfig').gopls.setup({}) require('lspconfig').julials.setup({}) @@ -359,7 +362,6 @@ then } }) - require('lspconfig').zls.setup({}) else print('Should never be here LSP config') end diff --git a/lua/eddie/lazy.lua b/lua/eddie/lazy.lua index a9846d0..062bb76 100644 --- a/lua/eddie/lazy.lua +++ b/lua/eddie/lazy.lua @@ -180,6 +180,10 @@ local plugins = { end, opts = {} }, + -- C/C++ debbuging + { + 'sakhnik/nvim-gdb', + }, } require('lazy').setup(plugins, {