microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.43k stars 429 forks source link

CMake Tools Language Services - Colorization #3559

Open gcampbell-msft opened 4 months ago

gcampbell-msft commented 4 months ago

Brief Issue Summary

Add support for a textmate grammar to add colorization for CMakeLists.txt and other relevant, applicable files.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

gcampbell-msft commented 4 months ago

Overrarching topic issues: #534 #93

calebnwokocha commented 2 months ago

{ "scopeName": "source.cmake", "fileTypes": ["CMakeLists.txt"], "patterns": [ { "name": "comment.line.number-sign.cmake", "match": "#.*$" }, { "name": "keyword.control.cmake", "match": "\\b(if|else|endif|foreach|endforeach|while|function)\\b" }, { "name": "keyword.other.cmake", "match": "\\b(add_executable|add_library|target_link_libraries|include_directories|link_directories)\\b" }, { "name": "constant.numeric.cmake", "match": "\\b[0-9]+\\b" }, { "name": "string.quoted.double.cmake", "begin": "\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.cmake", "match": "\\\\." } ] } ] } This JSON snippet defines a simple TextMate grammar for CMakeLists.txt files. It includes basic patterns for comments, keywords, numeric constants, and double-quoted strings.

gcampbell-msft commented 2 months ago

@calebnwokocha Thanks. We are in the midst of working on bringing cmake tools colorization into CMake Tools, we have a partial implementation for our language services targeting 1.18 here: #3679

gcampbell-msft commented 1 month ago

All, I removed the fixed (release pending) tag. This is due to the fact that we were not able to implement quick info in time for the 1.18 release and we don't want a drop in functionality from previous releases. We hope to merge these changes back into pre-release when available.