Closed blackliner closed 3 years ago
Can approve this behaviour. This was introduced with the latest release. Using 0.6.11 is a possible workaround.
Further with the latest release the cmake-format
binary seems to be missing. I get
whereis cmake-format
cmake-format:
With 0.6.11 a binary is there.
Is there a way to configure the extension to look for CMakeLists.txt files in addition?
Add the following to your settings.json
:
{
"files.associations": {
"CMakeLists.txt": "cmake"
}
}
@hofbi
This was introduced with the latest release.
There have been no changes in file associations with the latest release.
Further with the latest release the cmake-format binary seems to be missing
The vscode extension has never shipped the binary. The binary should be installed through pip.
Is there a way to configure the extension to look for CMakeLists.txt files in addition?
Add the following to your
settings.json
:{ "files.associations": { "CMakeLists.txt": "cmake" } }
Do you mean the
Oh, vscode, got it.cmake-format
file one gets when cmake-format --dump-config > .cmake-format
?
Add the following to your settings.json
@blackliner He means the VSCode settings.json
But manually adding this seems to me just like a workarround. Actually one would expect that CMakeLists.txt are by default recognized to be formatted. VSCode itself does this association, right? For instance on my machine I have full CMake support on these files without the file association. However, the format is not happening and I am pretty sure this already worked.
Update:
I did some tests on another machine and here both issues do not occur. So it seems to be a local issue and maybe one causes the other. @blackliner What do you get when you run cmake-format -v && whereis cmake-format
The vscode extension has never shipped the binary. The binary should be installed through pip.
I did the installation via pip. This are my steps to reproduce
pip3 install cmake_format
whereis cmake-format
cmake-format:
pip3 install -U cmake_format==0.6.11
whereis cmake-format
cmake-format: /valid/path/to/cmake-format
I had to uninstall the extension, because both this and C/C++ extension from Microsoft try to format.
With the VSCode extension, only *.cmake files are considered CMake files. But the majority of files are usually CMakeLists.txt
Is there a way to configure the extension to look for CMakeLists.txt files in addition?