fix: testing revealed errors

This commit is contained in:
dlond 2025-09-03 08:05:56 +12:00 committed by Daniel Lond
parent fef576fbde
commit 220864faf2
3 changed files with 10 additions and 4 deletions

View File

@ -90,7 +90,14 @@ CompileFlags:
local clients = vim.lsp.get_active_clients({ name = 'clangd' })
if #clients > 0 then
vim.notify('Restarting clangd...', vim.log.levels.INFO)
vim.cmd('LspRestart clangd')
-- Stop and start clangd to pick up new config
for _, client in ipairs(clients) do
client.stop()
end
vim.defer_fn(function()
vim.cmd('LspStart clangd')
vim.notify('Clangd restarted with new configuration', vim.log.levels.INFO)
end, 100)
end
else
vim.notify('Failed to create .clangd file', vim.log.levels.ERROR)

View File

@ -21,9 +21,6 @@ function M.setup()
-- Setup LSP keymaps
require('plugins.config.lsp.keymaps').setup()
-- Setup compile_commands.json picker for C/C++ projects
require('plugins.config.compile-commands-picker').setup()
end
return M

View File

@ -17,5 +17,7 @@ return {
},
config = function()
require('plugins.config.telescope').setup()
-- Setup compile_commands.json picker for C/C++ projects
require('plugins.config.compile-commands-picker').setup()
end,
}