debugging watcher
This commit is contained in:
parent
de6105eb24
commit
3c60b5c149
|
@ -71,9 +71,8 @@ function M.pick_commands_dir()
|
|||
map('i', '<CR>', function(prompt_bufnr)
|
||||
local entry = require('telescope.actions.state').get_selected_entry()
|
||||
require('telescope.actions').close(prompt_bufnr)
|
||||
M.stop_clangd()
|
||||
vim.defer_fn(function()
|
||||
M.start_clangd(entry[1])
|
||||
M.reload_clangd(entry[1])
|
||||
end, 100)
|
||||
end)
|
||||
return true
|
||||
|
@ -122,7 +121,7 @@ function M.watch_compile_commands(dir)
|
|||
vim.schedule(function()
|
||||
vim.notify '[clangd] Detected compile_commands.json change. Reloading ...'
|
||||
watch_path = vim.fn.fnamemodify(fname, ':h')
|
||||
M.start_clangd(watch_path)
|
||||
M.reload_clangd(watch_path)
|
||||
M.watch_compile_commands(watch_path)
|
||||
end)
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue