Josh Pinto
Josh Pinto

Reputation: 1573

How to associate .install file extension and PKGBUILD file name with shell scripts in VSCode?

In Visual Studio Code I have tried to associate *.install (i.e., files with the extension .install) and PKGBUILD files with shell script syntax highlighting, using:

// Place your settings in this file to overwrite the default settings
{
    "file.associations": {
        "PKGBUILD": "shell",
        "*.install": "shell-script",
        "*.desktop": "ini"
    }
}

but it hasn't worked (for either file name/extension), that is, neither file name/extension is getting syntax highlighting from shell. I have tried changing shell/shell-script with shellscript, after looking at the shellscript package's source code (https://github.com/Microsoft/vscode/blob/master/extensions/shellscript/package.json).

Upvotes: 1

Views: 375

Answers (1)

Daniel Imms
Daniel Imms

Reputation: 50149

You're missing the "s" in "files":

{
    "files.associations": {
        "PKGBUILD": "shellscript",
        "*.install": "shellscript",
        "*.desktop": "ini"
    }
}

Once the setting is corrected, you can use any of the aliases in the file you linked https://github.com/Microsoft/vscode/blob/master/extensions/shellscript/package.json

Upvotes: 1

Related Questions