Closed sekirocc closed 1 year ago
you want
require("clangd_extensions").setup{
server = {
cmd = {
"clangd",
"-j=4",
"--background-index",
"--clang-tidy",
"--fallback-style=llvm",
"--all-scopes-completion",
"--completion-style=detailed",
"--header-insertion=iwyu",
"--header-insertion-decorators",
"--pch-storage=memory",
},
initialization_options = {
fallback_flags = { "-std=c++17" },
},
},
}
Hi, thanks for your reply! but sorry i tried the settings, it didn't work either.
For standard you can also add
If:
PathMatch: [.*\.cpp, .\*.cc, .\*.cxx, .\*.hh, .\*.hpp, .\*.hxx]
CompileFlags:
Add: [-std=c++17]
to your clangd config file (which is ~/.config/clangd/config.yaml
on linux)
That said, I don't know why that doesn't work for you, it works for #15
ok, put it in ~/.config/clangd/config.yaml
is a good & simple way to enable compile flags globally, thanks!
Hi, in my
init.lua
i have the following config.but i get this warning in my c++11 project.![image](https://github.com/p00f/clangd_extensions.nvim/assets/2155893/15a42240-21bb-423f-b03d-8af55cd88612)
after i set c++ standards in
.clangd
file, like thisthe warning gone! but i really don't want to add this extra file in every projects...
How can i set this in the
init.lua
config?Maybe need to tweak something in the
setup{}
, but i'm really new in vim lsp stuff... i googled and tried the following, still have no luck..