Files icon indicating copy to clipboard operation
Files copied to clipboard

Feature: Add a setting to change the "open" ide on the status bar

Open A-iko opened this issue 1 year ago • 3 comments

What feature or improvement do you think would benefit Files?

Hey there!

I'm really enjoying the new git integration with Files, but there's one small thing I'm missing. I use code-insiders as my daily driver, the beta version of visual studio code, and the "VS Code" button doesn't seem to work. Since insiders functions the same as regular VS Code, I tried a couple of ways to make this work, including creating a shortcut called code.exe and adding it to the path, but it doesn't seem like that does the trick.

I did read that adding support for other IDE's is being considered, but I think having an optional setting pointing at the code.exe you wish to use would be a great consideration for those of us who use VS code alternatives like Insiders or VS Codium.

Requirements

  • Add an optional setting to user_settings.json that can point at an exe.
  • When the setting is filled in, instead of using the discovered VS Code installation, use the exe the new setting points at to launch VS Code when the VS Code button is pressed in the right bottom of the screen.
  • When the setting is an empty string (I assume this is the way this file usually functions, when I look at "AppThemeAddressBarBackgroundColor" and similar settings) or the setting is absent, use the originally discovered VS Code executable.

Files Version

2.5.11.0

Windows Version

10.0.23486.1000

Comments

Thanks for your time and hard work!

A-iko avatar Jul 05 '23 08:07 A-iko

Thanks for the feedback, I've added this to the project board.

Josh65-2201 avatar Jul 07 '23 14:07 Josh65-2201

A temporary (dirty) solution while @yaira2 is working on this:

Add a new registry key under Software\Microsoft\Windows\CurrentVersion\Uninstall called Microsoft Visual Studio Code (in either the current user or local machine container). You can do this using the following command:

New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual Studio Code"

This will trick Files into thinking the regular VS Code is installed. Then, you must also ensure that the code command launches VS Code Insiders. I did this by creating a file called code.cmd with the following contents:

@echo off
setlocal
set VSCODE_DEV=
set ELECTRON_RUN_AS_NODE=1
"C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" "C:\Program Files\Microsoft VS Code Insiders\resources\app\out\cli.js" %*
endlocal

And adding that to my path.

mahtaran avatar Feb 19 '24 21:02 mahtaran

I don't use VS Code very often; much more often I open the repository in GitExtensions. I think I'm not the only one. It would be great if known git GUIs were automatically detected and menu items were added, or at least this could be configured.

RusKnyaz avatar May 13 '24 06:05 RusKnyaz

We have two potential approaches for this feature. The first is to provide a setting to change the default IDE. The other approach is to support multiple IDEs. I'd like to understand the specific use cases to ensure we get the basics right and avoid unnecessary complexity.

yaira2 avatar Nov 05 '24 21:11 yaira2

As a Jetbrains user, I'd very much want to see this option.

With regards to the approaches, I think the best route would be to have the IDE configurable on a per-project basis, with some default. This way I could open one project in Android Studio and another one in IntelliJ, for example. I'd say don't try to autodetect the IDE for a project.

armandn avatar Jan 06 '25 08:01 armandn

If I could throw my $0.02 in here, I think it'd be nice to attempt to auto-detect installed IDE's instead of requiring the user to paste the path of the IDE executable. I'm not saying auto-detect what IDE was used, but rather auto-detect installed IDE's during configuration.

One method of doing this, specifically for JetBrains IDEs, is by launching the CMD or Bash scripts located in the Toolbox scripts folder located at %LocalAppData%\JetBrains\Toolbox\scripts.

That location is configurable, but the location can be parsed out via the .settings.json file in the %LocalAppData%\JetBrains\Toolbox\, or wherever Toolbox is installed (Which itself can be parsed out via the registry). You're already doing something similar with VSCode, using the registry to validate its installation.

This may be overly complex, but it'd be a huge QoL feature

natereprogle avatar Feb 15 '25 22:02 natereprogle