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

cant disable squiggles #114

Closed
Kurt-Shiwz opened this issue Dec 9, 2020 · 7 comments
Closed

cant disable squiggles #114

Kurt-Shiwz opened this issue Dec 9, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@Kurt-Shiwz
Copy link

Kurt-Shiwz commented Dec 9, 2020

clangd version 10.0.0 (https://github.com/llvm/llvm-project d32170dbd5b0d54436537b6b75beaf44324e0c28)
os: macos 10.15.7
vscode 1.51.1
clangd extesion v0.1.8

there are some error squiggles on many files, i build on linux server, so i want disable squiggles, but i dont find the config.

like this:
image

@Kurt-Shiwz Kurt-Shiwz added the bug Something isn't working label Dec 9, 2020
@sam-mccall
Copy link
Member

If you don't have a working build (e.g. missing compile_commands.json, or not all the required headers, or the code is just not portable to your platform) then clangd isn't going to work very well. For example, if an #include is not found, then we're not going to be able to parse code that refers to types defined in that header. Go-to-definition is unlikely to work reliably etc.

So I'm not sure what your goal is here:

  • do you want a way to disable clangd for these files entirely?
  • do you want to hide the diagnostics, but keep using other clangd features (which are unlikely to work well, and you won't know why)
  • do you want to make use of your remote build setup with clangd? (VSCode remote development works well for this!)
  • do you want clangd to work well locally? (in which case you need to fix the errors, even on the local machine. How to do this depends on what they are)

@HighCommander4
Copy link
Contributor

  • do you want to hide the diagnostics, but keep using other clangd features (which are unlikely to work well, and you won't know why)

This can sometimes be useful, e.g. local declarations can often be resolved and navigated to.

(This is also one of the cases where allowing the textual heuristic for go-to-def to trigger for non-dependent identifiers would be helpful.)

@Kurt-Shiwz
Copy link
Author

If you don't have a working build (e.g. missing compile_commands.json, or not all the required headers, or the code is just not portable to your platform) then clangd isn't going to work very well. For example, if an #include is not found, then we're not going to be able to parse code that refers to types defined in that header. Go-to-definition is unlikely to work reliably etc.

So I'm not sure what your goal is here:

  • do you want a way to disable clangd for these files entirely?
  • do you want to hide the diagnostics, but keep using other clangd features (which are unlikely to work well, and you won't know why)
  • do you want to make use of your remote build setup with clangd? (VSCode remote development works well for this!)
  • do you want clangd to work well locally? (in which case you need to fix the errors, even on the local machine. How to do this depends on what they are)

just hide the diagnostics, there is too many

sam-mccall added a commit to llvm/llvm-project that referenced this issue Jan 25, 2021
This has been specifically requested:
  clangd/vscode-clangd#114
and various issues can be addressed with this as a workaround, e.g.:
  clangd/clangd#662

Differential Revision: https://reviews.llvm.org/D95349
@sam-mccall
Copy link
Member

Clangd 12 will support this with config:

Diagnostics:
  Suppress: *

@tangdading6
Copy link

clangd version 12.0.0

When I have add the follow code to ~/.config/clangd/config.yaml,

Diagnostics:
  Suppress: *

I get the error info from vscode-clangd.
Screenshot_20210227_071825

@i-ky
Copy link

i-ky commented Feb 26, 2021

* needs to be in quotes: '*' or "*", otherwise it is interpreted as an anchor reference in YAML.

@tangdading6
Copy link

* needs to be in quotes: '*' or "*", otherwise it is interpreted as an anchor reference in YAML.

Thanks!

arichardson pushed a commit to arichardson/llvm-project that referenced this issue Mar 30, 2021
This has been specifically requested:
  clangd/vscode-clangd#114
and various issues can be addressed with this as a workaround, e.g.:
  clangd/clangd#662

Differential Revision: https://reviews.llvm.org/D95349
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this issue Oct 7, 2022
This has been specifically requested:
  clangd/vscode-clangd#114
and various issues can be addressed with this as a workaround, e.g.:
  clangd/clangd#662

Differential Revision: https://reviews.llvm.org/D95349
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants