Skip to content

Support more file extensions for syntax highlighting #2

Description

@markusfurtlehner

Problem

The Monaco editor does not support syntax highlighting for all file types. This was originally reported for PS1 (PowerShell) files which had no highlighting.

The root cause was that getMonacoLang() in frontend/src/utils.ts only mapped ~10 file extensions, despite Monaco shipping with ~75 built-in languages.

Affected file types (reported)

  • .ps1, .psm1, .psd1 (PowerShell)
  • .cshtml, .razor (Razor)

Additional gaps

  • File types not natively supported by Monaco (e.g., Nix, TOML) have no highlighting at all
  • Extensionless files (e.g., Makefile, Dockerfile, .gitignore) may not be detected correctly

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions