home: vim: prefer 'clangd' to 'clang-format'
Only use `clang-format` if `clangd` is not available, as its formatting is otherwise built into the LSP server.
This commit is contained in:
parent
842489a986
commit
f2f2b2a98a
|
@ -9,8 +9,10 @@ null_ls.setup({
|
||||||
-- C, C++
|
-- C, C++
|
||||||
null_ls.register({
|
null_ls.register({
|
||||||
null_ls.builtins.formatting.clang_format.with({
|
null_ls.builtins.formatting.clang_format.with({
|
||||||
-- Only used if available
|
-- Only used if available, but prefer clangd formatting if available
|
||||||
condition = utils.is_executable_condition("clang-format"),
|
condition = function()
|
||||||
|
return utils.is_executable("clang-format") and not utils.is_executable("clangd")
|
||||||
|
end,
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue