Skip to content

[EXTENSIONS] Register a new filename

MotionCode Dev edited this page Jun 23, 2026 · 2 revisions

Welcome!

This is a quick guide on how to register a filename and assign unique properties to it

package.json

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

"filenames.register": "language/filenames"

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

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

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