]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/visual-studio-code/visual-studio-code.factor
editors: bunch of cleanup.
[factor.git] / basis / editors / visual-studio-code / visual-studio-code.factor
1 ! Copyright (C) 2015 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: editors kernel make memoize namespaces system vocabs ;
4 IN: editors.visual-studio-code
5
6 SINGLETON: visual-studio-code
7 visual-studio-code editor-class set-global
8
9 HOOK: find-visual-studio-code-path os ( -- path )
10
11 MEMO: visual-studio-code-path ( -- path )
12     \ visual-studio-code-path get [
13         find-visual-studio-code-path
14         [ "code" ] unless*
15     ] unless* ;
16
17 M: visual-studio-code editor-command ( file line -- command )
18     [
19         visual-studio-code-path , drop ,
20     ] { } make ;
21
22 os windows? [ "editors.visual-studio-code.windows" require ] when