'Clangd in VSCode: .clang-format and .clang-tidy files
I've been trying to setup my VSCode to work with Clangd as a LSP server for my Cpp projects. I've successfully established basic functions such as the LSP itself and configured correct build settings in order to generate index database.
However I was not able to get my .clang-format and .clang-tidy configurations to work. It seems, that clangd does not search for those files.
I suspect, that this might be linked to the fact, that VSCode uses the clangd in stdin/stdout mode, however, I am not sure.
Thanks and have a nice day :)
(I'm using Ubuntu 18.04 with Clang+LLCM 9.0.0)
Solution 1:[1]
I had the same problem, and finally, I found out that it was because the encoding of the .clangformat file was UTF-16, I changed it to UTF-8 encoding and it solved the problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Biclops |