Skip to content

Asset metadata highlighting is lost in python files when using ty as language server #721

@CarlosGTrejo

Description

@CarlosGTrejo

I'm using the ty extension for Python language support.
When this extension is enabled, the custom syntax highlighting for Bruin asset metadata (the """ @bruin ... """ block) in Python files stops working. The metadata block renders as a generic docstring instead of having its specific keys and values highlighted.

Steps to reproduce

On a new VS Code profile, have a python asset open.

  1. Install Bruin Extension (assuming you have Bruin CLI already installed)
    • The python asset should have the metadata syntax highlighted (figure 1)
  2. Install ty
    • The metadata syntax highlighting should now be gone (figure 2)

Syntax highlighting working as expected (figure 1)

Image

Syntax highlighting missing (figure 2)

Image

Expected Behavior

The Bruin metadata block in Python assets should retain its custom syntax highlighting even when ty is installed/providing the python syntax highlighting.

Workaround (not ideal)

Setting "ty.disableLanguageServices": true in settings.json restores Bruin's syntax highlighting but disables ty's code completion, hover, go to definition, and other features which is not ideal.

Environment

  • OS: Windows 11 (IoT Enterprise LTSC)
  • VS Code: 1.109.5
  • Node.js: 22.21.1
  • Bruin CLI: v0.11.471
  • Bruin Extension: 0.77.6
  • ty Extension: 2026.16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions