cmake-language-support
cmake-language-support copied to clipboard
intellisense for declarations from an `include()`
I'm not sure to what degree declarations from include()
s are already added to intellisense, but I've noticed some things not being added. For example,
-
FetchContent_Declare
afterinclude(FetchContent)
-
generate_export_header
afterinclude(GenerateExportHeader)
-
${CMAKE_INSTALL_INCLUDEDIR}
afterinclude(GNUInstallDirs)
Are there things that make something like this difficult to support?
Even with cmake.languageSupport.enableFileAPI=True
, CMake Tools extension installed, and after a successful CMake configuration, functions, macros & variables coming from an include()
don't have any syntax highlighting nor autocompletion.
At least in include()
command, there is an autocompletion & syntax highlighting of CMake bundled module files (but not for custom module files of a project, I would have expected something like traversing CMAKE_MODULE_PATH
and look at additional CMake module files in these directories).
Please add this. This would be very helpful. Per documentation, FetchContent_Declare()
takes "any of the download, update or patch options that the ExternalProject_Add". That should be very easy to add.
Indeed. cmake_dependent_option()
similarly from include(CMakeDependentOption)
. However it would be awesome if documentation of custom packages with built CMake documentation could be displayed similarly, thinking of project-specific modules that have CMake-like documentation built, such as rocm-cmake used throughout the ROCm ecosystem.
Any updates on this? I tried using "cmake.languageSupport.enableFileAPI": true
but functions obtained from include()
are not highlighted until the include file is selected.