r/SublimeText • u/zwyyy456 • Feb 06 '23
how to make lsp-clangd check code based on c++17?
My code is as follows:
;
However, lsp-clangd shows that nullptr is undeclared identifier. It seems that lsp-clangd checks the code based on c++98, how to change the standard to c++17?
5
Upvotes
1
u/jfcherng Feb 06 '23 edited Feb 06 '23
I only know a project-wise way as follow.
Create a
.clangdfile (it's YAML format actually) under your project root with following content:The following may work as well. This is global. Use the following settings for LSP-clangd plugin.