Skip to content

[EXTENSIONS] Register a new file extension

MotionCode Dev edited this page Jun 23, 2026 · 1 revision

Welcome!

This is a brief guide on how to associate a file extension with a specific program

package.json

In your extension's package.json file, you need to add the following line:

"fileExtensions.register": "language/fileExtensions"

Where the value is the absolute path to the file containing your configuration. Example JSON configuration (example of the fileExtensions.json file):

{
    "slimconfig": {
        "icon": "language/config-icon.svg",
        "name": "Slim Config File",
        "mode": "json"
    }
}

Where:

  • icon - The absolute path to the icon. Accepts only .svg or .png formats
  • name - The name that will be displayed when the file is opened in the editor
  • mode - The language in which the file will open (you can specify custom languages if they are registered)

Clone this wiki locally