debugging watcher

This commit is contained in:
dlond 2025-05-30 02:14:17 +12:00
parent 9169d2f789
commit 4c6d17824c
1 changed files with 13 additions and 8 deletions

View File

@ -107,6 +107,9 @@ return {
'neovim/nvim-lspconfig',
ft = M.clang_filetypes,
config = function()
vim.api.nvim_create_autocmd('FileType', {
pattern = M.clang_filetypes,
callback = function()
local dir = find_compile_commands()
if dir then
vim.notify('[clangd] Found compile_commands at: ' .. dir)
@ -115,6 +118,8 @@ return {
vim.notify '[clangd] No compile_commands found, watching ...'
M.watch_compile_commands()
end
end,
})
vim.keymap.set('n', '<leader>cc', M.pick_commands_dir, { desc = 'Pick location of compile_commands.json for clangd' })
end,