debugging watcher
This commit is contained in:
parent
9169d2f789
commit
4c6d17824c
|
@ -107,14 +107,19 @@ return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
ft = M.clang_filetypes,
|
ft = M.clang_filetypes,
|
||||||
config = function()
|
config = function()
|
||||||
local dir = find_compile_commands()
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
if dir then
|
pattern = M.clang_filetypes,
|
||||||
vim.notify('[clangd] Found compile_commands at: ' .. dir)
|
callback = function()
|
||||||
M.setup_clangd(dir)
|
local dir = find_compile_commands()
|
||||||
else
|
if dir then
|
||||||
vim.notify '[clangd] No compile_commands found, watching ...'
|
vim.notify('[clangd] Found compile_commands at: ' .. dir)
|
||||||
M.watch_compile_commands()
|
M.setup_clangd(dir)
|
||||||
end
|
else
|
||||||
|
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' })
|
vim.keymap.set('n', '<leader>cc', M.pick_commands_dir, { desc = 'Pick location of compile_commands.json for clangd' })
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue