Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

This changes visible behavior

The following changes are proposed:

  • Register the correctly cased CMakeLists.txt alongside the legacy lowercase variant for the CMake grammar contribution to restore syntax coloring.
  • Document the user-visible fix in the 1.23 changelog under Bug Fixes.

The purpose of this change

Syntax highlighting regressed in 1.22.26 because the grammar contribution no longer matched the standard CMakeLists.txt casing. This restores recognition so CMake files highlight as expected.

Other Notes/Information

Example contribution change:

{
  "id": "cmake",
  "extensions": [".cmake"],
  "filenames": ["CMakeLists.txt", "CMakelists.txt"],
  "aliases": ["CMake"]
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 2wrvsblobprodwus2180.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install --frozen-lockfile (dns block)
  • 40vvsblobprodwus2135.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install --frozen-lockfile (dns block)
  • b15vsblobprodwus2164.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install --frozen-lockfile (dns block)
  • b53vsblobprodwus2154.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install --frozen-lockfile (dns block)
  • d94vsblobprodwus2119.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install --frozen-lockfile (dns block)
  • k4pvsblobprodwus2140.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install --frozen-lockfile (dns block)
  • n6wvsblobprodwus2123.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install --frozen-lockfile (dns block)
  • p2tvsblobprodwus2189.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install --frozen-lockfile (dns block)
  • v41vsblobprodwus2175.vsblob.vsassets.io
    • Triggering command: /usr/local/bin/node node /usr/local/bin/yarn install --frozen-lockfile (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Syntax Highlighting/Coloring Broken since 1.22.26 release</issue_title>
<issue_description>
Type: Bug

Syntax highlighting appears to be broken following the update, with the update's problem appearing visually similar to past issues such as: #4508

Nothing was done differently with CMakeLists.txt before vs. after update. Can be reproduced with any CMakeLists.txt file and the extension loaded, along with clangd - intellisense for cpp is turned off in favor of clangd.

installing the previous version 1.21.36 and reloading the window immediately fixes the problem.

Before (1.21.36)

Image

After (1.22.26)

Image

Extension version: 1.22.26
VS Code version: Code 1.108.2 (c9d77990917f3102ada88be140d28b038d1dd7c7, 2026-01-21T13:52:09.270Z)
OS version: Windows_NT x64 10.0.26200
Modes:
Remote OS version: Linux x64 6.6.87.2-microsoft-standard-WSL2
Remote OS version: Linux x64 6.6.87.2-microsoft-standard-WSL2

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-1255U (12 x 2611)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.69GB (41.46GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-24.04
OS Linux x64 6.6.87.2-microsoft-standard-WSL2
CPUs 12th Gen Intel(R) Core(TM) i7-1255U (6 x 0)
Memory (System) 15.25GB (12.50GB free)
VM 0%
Item Value
Remote WSL: Ubuntu-24.04
OS Linux x64 6.6.87.2-microsoft-standard-WSL2
CPUs 12th Gen Intel(R) Core(TM) i7-1255U (6 x 0)
Memory (System) 15.25GB (12.50GB free)
VM 0%

<agent_instructions>You are Copilot coding agent acting as a senior maintainer/contributor for the VS Code extension repository microsoft/vscode-cmake-tools.
You are deeply familiar with CMake, CMake Presets, CTest, kit/toolchain selection, VS Code extension APIs, and the architecture of this repo (TypeScript-heavy).
Your job is to resolve the GitHub issue provided below safely and in a maintainable way, matching existing patterns and UX.

SOURCE OF TRUTH

NON-NEGOTIABLE PROCESS

  1. Triage & understanding (issue-first)
  • Read the entire issue thread.
  • Extract and write down:
    • expected behavior
    • actual behavior
    • repro steps (or minimal repro you infer)
    • affected OS/toolchains/generators/presets
    • whether it is a regression and from which version/commit (if indicated)
  • Identify which CMake Tools feature area is involved (configure/build/test/debug, presets, kits, status bar, tasks, command palette, IntelliSense).
  1. Orient yourself in the repo (implementation map)
  • Identify the relevant user-facing workflows impacted (configure/build/test/debug, presets, kits, status bar, tasks, command palette).
  • Locate the existing implementation areas (commands, configuration/presets handling, test integration, UI, telemetry/logging).
  • Identify existing tests and how they are run in CI; prefer extending existing suites over inventing a new harness.
  1. Changelog discipline (required)
  • Find the project’s changelog / release notes mechanism (e.g., CHANGELOG.md, docs/changelog, “Unreleased” section, or a dedicated changes/ folder).
  • Add exactly ONE appropriate entry for this change, in the correct section and format used by the repo.
  • The entry must describe user-visible behavior (not internal refactors).
  • If the change is not user-visible, explicitly justify that and still add a brief “Internal” entry if the repo’s convention supports it.
  • Ensure the changelog entry matches wording/tense/category conventions already used by the repo.
  1. Implementation standards
  • Follow existing code style, naming, and patterns in this repository.
  • Prefer small, readable changes; avoid broad refactors unless clearly necessary to fix the issue correctly.
  • Preserve backward compatibility for sett...

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix syntax highlighting issue after 1.22.26 release Jan 30, 2026
Copilot AI requested a review from hanniavalera January 30, 2026 13:52
Co-authored-by: hanniavalera <90047725+hanniavalera@users.noreply.github.com>
@hanniavalera hanniavalera force-pushed the copilot/fix-syntax-highlighting-bug branch from 8800432 to 6d67e80 Compare January 30, 2026 13:52
@hanniavalera
Copy link
Contributor

smoke tested and validated that fix restored syntax highlighting
image

@hanniavalera hanniavalera marked this pull request as ready for review January 30, 2026 14:22
Copy link
Collaborator

@gcampbell-msft gcampbell-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the issue, the grammar is what we'd need to change if we change colorization

@gcampbell-msft
Copy link
Collaborator

smoke tested and validated that fix restored syntax highlighting image

This matches what the customer said "didn't work". It's not that colorization isn't working in that bug, the user is simply noting that it's different. It's still working, but we had reverted to the previous version of our textmate due to some issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants