Skip to content

Syntax highlighting is buggy in class folders #341

Description

@s6nke

Describe the bug
When having code in a class folder (beginning with '@') the highlighting is inconsistent and all over the place for the main class declaration file. This reaches from just missing keyword highlighting (for, classdef, ...) to arbitrary words having multiple colors. This makes reading of documents very hard and efficient working nearly impossible.

To Reproduce
Steps to reproduce the behavior:

  1. Create a class-folder (also nested in namespaces)
  2. Create the classes main file, e.g. +mynamespace/@MyClass/MyClass.m
  3. Create another method for the class and to arbitrary work on the class
  4. open and edit documents. Sometime the behavior appears only after a loaded document is changed.
  5. Visually inspect the document in VSCode.

Expected behavior
The same highlighting behavior between files in "normal" folders as in class folders.

Screenshots
Image

Useful Information

  • MATLAB Version: R2025b, 1.3.13
  • OS Version: Ubuntu 24.04, Arch
  • VS Code Version: 1.130

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions