webfansplz / vite-plugin-vue-inspector

jump to editor source code while click the element of browser automatically.
MIT License
683 stars 70 forks source link

Opens nano even VUE_EDITOR is set to phpstorm #78

Closed eboye closed 3 months ago

eboye commented 1 year ago

I've tried exporting the variable in .zshrc

export VUE_EDITOR=/usr/local/bin/phpstorm

and also

export VUE_EDITOR=phpstorm

but it opens the file in nano in the terminal emulator from which it was started.

I'm using:

OS: Arch Linux DE: Gnome 44 TE1: Terminator - installed from official Arch repo (not flatpak or something else) TE2: Gnome Terminal - installed from official Arch repo (not flatpak or something else) IDE: PHPStorm - installed as binary from JetBrains

Any suggestions on what should I try?

devinRex commented 7 months ago

Same as vscode on mac. OS: macOS Big Sur 11.6 Apple M1 Add export VUE_EDITOR=code or export VUE_EDITOR = /usr/local/bin/code in ~/.zshrc

still open /Applications/Sublime Text.app

AlexGodbehere commented 5 months ago

Try LAUNCH_EDITOR instead.

Smef commented 4 months ago

LAUNCH_EDITOR is overwritten in /packages/core/src/index.ts:174 and it goes back to the value from DEFAULT_INSPECTOR_OPTIONS, which is code.

0gust1 commented 3 months ago

Came here to say that I looked to launch zed editor instead of code (with no luck). IDK if there is an issue to open. If I can, I'll do some research beforehand.

webfansplz commented 3 months ago

Came here to say that I looked to launch zed editor instead of code (with no luck). IDK if there is an issue to open. If I can, I'll do some research beforehand.

Hi, In the latest version, you can try launchEditor option to specialize the editor.

0gust1 commented 3 months ago

Thanks!

Hi, In the latest version, you can try launchEditor option to specialize the editor.

That's what I quickly tried. I'll do my homework (tries and code source read) and will come back if needed.

Smef commented 3 months ago

The env should be LAUNCH_EDITOR, not VUE_EDITOR. I believe the latest versions are now properly using this env value.