Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no support c++11, and include my head ERROR #584

Closed
2 tasks done
rileychc opened this issue Mar 20, 2023 · 5 comments
Closed
2 tasks done

no support c++11, and include my head ERROR #584

rileychc opened this issue Mar 20, 2023 · 5 comments
Labels
bug Something isn't working clangd Clangd(lsp) related issues lsp LSP related issues

Comments

@rileychc
Copy link

Version confirmation

  • Confirm

Following prerequisites

  • Confirm

Neovim version

NVIM v0.8.3

Operating system/version

macOS 13.2.1

Terminal name/version

iterm2 Build 3.4.19

$TERM environment variable

xterm-256color

Branch info

main (Default/Latest)

Fetch Preferences

SSH (use_ssh = true)

Affected language servers

clangd

How to reproduce the issue

Uploading Pasted Graphic 2.png…

Actual behavior

Uploading Pasted Graphic 2.png…

Expected behavior

No response

Support info

Uploading Pasted1 Grap <img width="1993" alt="Pasted1 Graphic3" src="https://user-images.githubusercontent.com/116857974/226231426-ad861f9f-aaa0-4309-bad8-8d4d15e55ba9.png"> hic 1.png…

Logs

No response

Additional information

No response

@rileychc rileychc added bug Something isn't working lsp LSP related issues labels Mar 20, 2023
@ayamir
Copy link
Owner

ayamir commented Mar 20, 2023

No picture uploaded, I can't see them.
You need to set the clangd config file on your own refer to this.
For example, for user wide configuration:

mkdir -p ~/.config/clangd
touch ~/.config/clangd/config.yaml
nvim ~/.config/clangd/config.yaml

fill it with below:

CompileFlags:
  Add: [-std=c++11]

For project level config, add .clangd file under your project root and fill it with the same content above. But I recommand use compile_commands.json for project level clangd settings.

@ayamir
Copy link
Owner

ayamir commented Mar 20, 2023

For include dir, it should better be managed by cmake and use it to generate compile_commands.json.
Refer to https://clangd.llvm.org/installation.html#project-setup.

@rileychc
Copy link
Author

Pasted Graphic

Pasted Graphic 1

Pasted Graphic 2

@ayamir
Copy link
Owner

ayamir commented Mar 20, 2023

@rileychc
Copy link
Author

@ayamir ayamir closed this as completed Mar 20, 2023
@ayamir ayamir added the clangd Clangd(lsp) related issues label Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clangd Clangd(lsp) related issues lsp LSP related issues
Projects
None yet
Development

No branches or pull requests

2 participants