-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Open
Description
Feature Request: Built-in Syntax Highlighting for Unknown Languages
Summary:
VS Code should include a fallback syntax highlighter that automatically provides basic syntax highlighting for files with unknown or custom extensions, without requiring a full TextMate grammar or extension.
Motivation:
- Many developers create or experiment with custom languages (like Hexon) or new file formats.
- Currently, VS Code treats unknown file types as plain text with no syntax highlighting, which hurts readability and development flow.
- Having a generic, heuristic-based fallback highlighter would provide immediate visual structure—highlighting common tokens like keywords, strings, comments, numbers, and punctuation.
- This would reduce the barrier to experimenting with new languages and improve the user experience for niche/custom file types.
Possible Implementation Ideas:
- A default “generic” grammar with common programming constructs.
- Optional AI or pattern-based heuristic highlighting for unknown file extensions.
- A user toggle to enable/disable this fallback highlighting globally.
Benefits:
- Immediate, helpful syntax highlighting for any file, known or unknown.
- Encourages innovation and experimentation with new languages.
- Improves accessibility and readability for custom scripts/configs.
RedCMD
Metadata
Metadata
Assignees
Labels
No labels