Feature:
Add intelligent highlighting to CMake in non CLion IDEs.
Background
In issue (#73), basic PSI support was added for CMake in IDEs like PyCharm and IntelliJ. However, it only marks strings, grouping operators like parentheses, and the comment character #. This is not enough to do any work in CMake, and can even do damage in the case of comments. This must be addressed.
Details
[x] Correctly detect comments and annotate them accordingly.
[x] Correctly detect command calls and annotate them accordingly.
[x] keep a collection of CMake keywords (set, function, endfunction, if, etc.) and mark them accordingly.
For set, unset, use it to detect variables and annotate them accordingly.
[x] highlight the defined/undefined variable within set/unset
[x] highlight the variable use in subsequent commands
[x] For function, macro, detect the function name, and annotate.
For function, macro, detect parameters and annotate them correctly.
[x] Within the function or macro command, annotate the parameters they define.
[x] Within the function block, annotate parameter use previously defined in the function as variables
[x] Additional annotations for non-words, like ${} or $ENV{}
[x] Annotate parameter use in unquoted if a variable is found
Feature: Add intelligent highlighting to CMake in non CLion IDEs.
Background In issue (#73), basic PSI support was added for CMake in IDEs like PyCharm and IntelliJ. However, it only marks strings, grouping operators like parentheses, and the comment character #. This is not enough to do any work in CMake, and can even do damage in the case of comments. This must be addressed.
Details
[x] Correctly detect comments and annotate them accordingly.
[x] Correctly detect command calls and annotate them accordingly.
[x] keep a collection of CMake keywords (set, function, endfunction, if, etc.) and mark them accordingly.
For set, unset, use it to detect variables and annotate them accordingly.
[x] For function, macro, detect the function name, and annotate.
For function, macro, detect parameters and annotate them correctly.
[x] Additional annotations for non-words, like ${} or $ENV{}
[x] Annotate parameter use in unquoted if a variable is found