editors.visual-studio-code: Split up into Windows and other platforms.
parent
62ea429c2b
commit
07b90ca38c
|
@ -1,17 +1,16 @@
|
|||
! Copyright (C) 2015 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: arrays ascii editors io.directories.search
|
||||
io.files.temp.windows io.pathnames kernel make math.parser
|
||||
memoize namespaces sequences ;
|
||||
USING: editors kernel make memoize namespaces system vocabs ;
|
||||
IN: editors.visual-studio-code
|
||||
|
||||
SINGLETON: visual-studio-code
|
||||
visual-studio-code editor-class set-global
|
||||
|
||||
HOOK: find-visual-studio-code-path os ( -- path )
|
||||
|
||||
MEMO: visual-studio-code-path ( -- path )
|
||||
\ visual-studio-code-path get-global [
|
||||
get-appdata-directory 1array f
|
||||
[ file-name >lower "code.exe" = ] find-in-directories
|
||||
find-visual-studio-code-path
|
||||
[ "code" ] unless*
|
||||
] unless* ;
|
||||
|
||||
|
@ -20,3 +19,5 @@ M: visual-studio-code editor-command ( file line -- command )
|
|||
visual-studio-code-path ,
|
||||
swap , drop
|
||||
] { } make ;
|
||||
|
||||
os windows? [ "editors.visual-studio-code.windows" require ] when
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
windows
|
|
@ -0,0 +1,10 @@
|
|||
! Copyright (C) 2015 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: arrays ascii editors.visual-studio-code
|
||||
io.directories.search io.files.temp.windows io.pathnames kernel
|
||||
system ;
|
||||
IN: editors.visual-studio-code.windows
|
||||
|
||||
M: windows find-visual-studio-code-path
|
||||
get-appdata-directory 1array f
|
||||
[ file-name >lower "code.exe" = ] find-in-directories ;
|
Loading…
Reference in New Issue