For example, I'd like to prevent the "Run Code" button from appearing in the top bar specifically for .ps1 (PowerShell) files. I like using the Code Runner extension for .groovy files specifically, but don't really want the button to appear for other files such as PowerShell and Python scripts, since I already have other dedicated extensions that I prefer for those languages. Is this possible via the extension settings, and if so can someone explain how to do it?
1 Answers
Unfortunately, from what I can see, the answer at the time of this writing is no. Code Runner doesn't do anything on its own to detect if it has the current editor's language in its execution map (just try changing the language mode to "plaintext" and you'll see the play icon still there). VS Code's method for allowing changing settings on a per-language basis is for the extension maintainer to register a setting of theirs as a "language override setting", which will allow users to use it in language override blocks in their settings files, but Code Runner has not registered its code-runner.showRunIconInEditorTitleMenu
setting as a language override setting. You could create a feature-request issue ticket asking the maintainers of the extension to do so. If you do, please comment here with a link to your feature-request issue ticket.

- 20,030
- 7
- 43
- 238