emacs-lsp / emacs-ccls

Emacs client for ccls, a C/C++ language server
200 stars 29 forks source link

How do I make lsp-flycheck-ui support C++17? #42

Closed bk322 closed 5 years ago

bk322 commented 5 years ago

I'm using latest of everything, but flycheck under lsp-ui suggest that ccls doesn't support C++17:

017

Where to look for a fix?

MaskRay commented 5 years ago

GCC 6/Clang 6 default to -std=gnu++14

Make sure your compile_commands.json or .ccls specifys -std=c++17 (or gnu++17)

bk322 commented 5 years ago

Indeed, creating .ccls in root folder with

clang++
%cpp -std=c++17

solves it.

Also, header #include <iostream> is clickable, but when I click it nothing happens. Is it supposed to be like that, or do I lack docs available to ccls / lsp?