vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

CMake Tools Language Services - Colorization

Open gcampbell-msft opened this issue 1 year ago • 4 comments

Brief Issue Summary

Add support for a textmate grammar to add colorization for CMakeLists.txt and other relevant, applicable files.
This will include removing our dependency on twxs.cmake.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

gcampbell-msft avatar Feb 01 '24 14:02 gcampbell-msft

Overrarching topic issues: #534 #93

gcampbell-msft avatar Feb 01 '24 14:02 gcampbell-msft

{ "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.

calebnwokocha avatar Apr 08 '24 02:04 calebnwokocha

@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 avatar Apr 09 '24 14:04 gcampbell-msft

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.

gcampbell-msft avatar May 10 '24 12:05 gcampbell-msft