editors.visual-studio-code: Use the application name Electron on Mac instead of calling it through ``open`` util. Similar to how we do Atom editor support.
parent
e7fa8fbc2f
commit
63f2f22573
|
@ -20,23 +20,28 @@ MEMO: visual-studio-code-invocation ( -- array )
|
||||||
] unless* ;
|
] unless* ;
|
||||||
|
|
||||||
M: macosx find-visual-studio-code-invocation
|
M: macosx find-visual-studio-code-invocation
|
||||||
{ "open" "-b" "com.microsoft.VSCode" "--args" } ;
|
"com.microsoft.VSCode" find-native-bundle [
|
||||||
|
"Contents/MacOS/Electron" append-path
|
||||||
|
] [
|
||||||
|
f
|
||||||
|
] if* ;
|
||||||
|
|
||||||
ERROR: can't-find-visual-studio-code ;
|
ERROR: can't-find-visual-studio-code ;
|
||||||
|
|
||||||
M: linux find-visual-studio-code-invocation
|
M: linux find-visual-studio-code-invocation
|
||||||
"Code" which [
|
"Code" which [
|
||||||
home "VSCode-linux-x64/Code" append-path dup exists? [
|
home "VSCode-linux-x64/Code" append-path
|
||||||
can't-find-visual-studio-code
|
dup exists? [ drop f ] unless
|
||||||
] unless
|
] unless* ;
|
||||||
] unless* 1array ;
|
|
||||||
|
|
||||||
M: windows find-visual-studio-code-invocation
|
M: windows find-visual-studio-code-invocation
|
||||||
{ "Microsoft VS Code" } "code.exe" find-in-applications
|
{ "Microsoft VS Code" } "code.exe" find-in-applications
|
||||||
[ 1array ] [ can't-find-visual-studio-code ] if* ;
|
[ f ] unless* ;
|
||||||
|
|
||||||
M: visual-studio-code editor-command ( file line -- command )
|
M: visual-studio-code editor-command ( file line -- command )
|
||||||
[
|
[
|
||||||
visual-studio-code-invocation % "-g" , "-r" ,
|
visual-studio-code-invocation
|
||||||
|
[ , ] [ can't-find-visual-studio-code ] if*
|
||||||
|
"-g" , "-r" ,
|
||||||
number>string ":" glue ,
|
number>string ":" glue ,
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
Loading…
Reference in New Issue