How to set clangd for c17 #4033
-
Hi, How can I set clangd standards for helix, I tried |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
This should be similar to setting it up for coc-clangd: clangd/coc-clangd#20. It looks like you can specify the standard in the build instructions in # ~/.config/helix/languages.toml
[[language]]
name = "cpp"
config = { "clangd.fallbackFlags" = [ "-std=c++17" ] }
# ^ I haven't tried this. It might instead be
# config = { clangd.fallbackFlags = [ "-std=c++17" ] }
# or
# config = { fallbackFlags = [ "-std=c++17" ] } |
Beta Was this translation helpful? Give feedback.
-
Imo the following is nicer:
This lets you use the following for global options:
And you can put a similar file at the root of your project for projecct specific overrides |
Beta Was this translation helpful? Give feedback.
This should be similar to setting it up for coc-clangd: clangd/coc-clangd#20. It looks like you can specify the standard in the build instructions in
compile_flags.txt
/compile_commands.json
or you should be able to set it globally through the LSP configuration: