Closed tinygiant98 closed 2 years ago
It appears that clang-format was working correctly by setting "executable" to "clang-format" without any pathing, however, some global options in vsCode were preventing some options in clang-format from displaying as expected. Here's the final answer I used, assuming clang-format is on the global PATH: "executable": "clang-format"
. It also helps to find formatting options in vsCode and have the document auto-formatted on save/paste. Although vsCode has an option for it, it is not currently possible to format the document as you type each line.
I was able to successfully (and easily!) install this lsp, however I can't seem to get clang-format pathed correctly. I'm tried leaving
"executable"
asclang-format
because it's on the PATH, but that didn't work. Also tried absolute pathing as mentioned in setup using both/
and\\
as directory separators to theclang-format
file (like this ->"executable": "C:/Users/Ed/AppData/Roaming/npm/clang-format"
), also with no luck. Any guidance on the correct pathing formatting to get clang-format to work on a Windows install? Do I need to change this option somewhere other than vscode'ssettings.json
, such as in package.json or config.ts?