Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support functions in separated cmake modules #15

Open
regen100 opened this issue May 16, 2020 · 2 comments
Open

Support functions in separated cmake modules #15

regen100 opened this issue May 16, 2020 · 2 comments

Comments

@regen100
Copy link
Owner

Examples:

  • find_package_handle_standard_args in FindPackageHandleStandardArgs
  • find_package_message in FindPackageMessage
  • cmake_dependent_option in CMakeDependentOption
@rwols
Copy link
Contributor

rwols commented Jun 7, 2020

This language server should also complete function-calls previously defined with function() ... endfunction().

@regen100
Copy link
Owner Author

Short answer:
The completion of the user defined functions is difficult. I'm not planning to support it at the moment.

Long answer:
CMake is not providing any API to get function information. To get complete information of functions, parsing CMake scripts and simulating them are needed. It is roughly equivalent to making a copy of CMake. I gave up on it and took another approach which is to parsing the CMake document. It provides limited but useful information of the builtin functions.
Therefore, the current implementation of LSP cannot handle user-defined function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants