Skip to content

How to set clangd for c17 #4033

Answered by the-mikedavis
stokhos asked this question in Q&A
Sep 29, 2022 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

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:

# ~/.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" ] }

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@DrunkenRandomWalker
Comment options

@Zapeth
Comment options

@norquisd
Comment options

@jpsecher
Comment options

Answer selected by stokhos
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants
Converted from issue

This discussion was converted from issue #4023 on September 29, 2022 18:42.