Skip to content

[languages] contribution point languages provide the ability to extends #197881

@yiliang114

Description

@yiliang114

Type: Feature Request

Sometimes we want to redefine a language to match specific file suffixes. But I also want to directly reuse the grammar and lexical files of some existing language.

For example, I want to recognize all files ending in .sh as a new language and call it shellscript1, but I am not prepared to provide grammar files and lexical files for shellscript1 language, because in fact its configuration is exactly the same asshellscript, I just want to have a new language, which may not be the category of aliases.

The contribution point is roughly configured like this

      {
        "id": "shellscript1",
        "extend": "shellscript",
        "aliases": [
          "shell"
        ],
        "extensions": [
          ".sh"
        ]
      }

VS Code version: Code 1.84.1 (Universal) (2b35e1e, 2023-11-06T12:37:18.666Z)
OS version: Darwin x64 21.3.0
Modes:

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitylanguages-basicBasic language support issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions