cmake-language-server
cmake-language-server copied to clipboard
Detect Definitions in {project_root}/cmake/XYZ.cmake
I am using the coc.nvim client and I have a CMakeLists.txt which includes a helper.cmake (e.g. include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/CMakeHelper.cmake)
) file to define macros.
I would like to be able to jump to the definition of these macros. I know that this is possible with ctags.
Is there a way to use the language-server to jump to such a macro definition instead?
Sorry, the plugin clearly says that the "definition provider is not found". So this would be kind of a feature request or a question about your workflow. Do you use ctags for this (if you want to inspect macros at all)?
CMake provides no API to get function/macro information. So I gave up at this time (ref #15). However, it is practical to use ctags together. I usually use neovim with multiple LSPs and ctags.