lazy clangd
This commit is contained in:
parent
5d94528f6e
commit
54b59756d8
|
@ -37,15 +37,13 @@ function M.start_clangd(dir)
|
|||
'--query-driver=' .. vim.fn.exepath 'clang++',
|
||||
'--resource-dir=' .. vim.fn.systemlist({ 'clang++', '--print-resource-dir' })[1],
|
||||
}
|
||||
if dir and dir ~= '' then
|
||||
if not dir or dir == '' then
|
||||
vim.notify '[clangd] Could not find compile_commands.json.\nUse <leader>lc to manually set location when available.'
|
||||
dir = '.'
|
||||
end
|
||||
vim.notify('[clangd] Setting up with: ' .. dir)
|
||||
table.insert(cmd, '--compile-commands-dir=' .. dir)
|
||||
M.watch_compile_commands(dir)
|
||||
else
|
||||
vim.notify '[clangd] Could not find compile_commands.json.\nUse <leader>lc to manually set location when available.'
|
||||
vim.notify '[clangd] Setting up with: "."'
|
||||
table.insert(cmd, '--compile-commands-dir="."')
|
||||
end
|
||||
|
||||
print(vim.inspect(cmd))
|
||||
lspconfig.clangd.setup {
|
||||
|
|
Loading…
Reference in New Issue