Implement Kiss-VSCode in Kiss
This commit is contained in:
@@ -86,6 +86,8 @@ class Reader {
|
|||||||
readTable[","] = (stream, k) -> Unquote(assertRead(stream, k));
|
readTable[","] = (stream, k) -> Unquote(assertRead(stream, k));
|
||||||
readTable[",@"] = (stream, k) -> UnquoteList(assertRead(stream, k));
|
readTable[",@"] = (stream, k) -> UnquoteList(assertRead(stream, k));
|
||||||
|
|
||||||
|
// TODO make {...} a macro for (begin ...)
|
||||||
|
|
||||||
// Because macro keys are sorted by length and peekChars(0) returns "", this will be used as the default reader macro:
|
// Because macro keys are sorted by length and peekChars(0) returns "", this will be used as the default reader macro:
|
||||||
readTable[""] = (stream, k) -> Symbol(nextToken(stream, "a symbol name"));
|
readTable[""] = (stream, k) -> Symbol(nextToken(stream, "a symbol name"));
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
-cp src
|
-cp src
|
||||||
-lib vscode
|
-lib vscode
|
||||||
|
-lib hxnodejs
|
||||||
|
-lib kiss
|
||||||
-js bin/extension.js
|
-js bin/extension.js
|
||||||
-D analyzer-optimize
|
-D analyzer-optimize
|
||||||
-D js-es=6
|
-D js-es=6
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
import vscode.*;
|
import vscode.*;
|
||||||
|
import Sys;
|
||||||
|
import sys.io.Process;
|
||||||
|
import kiss.Kiss;
|
||||||
|
import kiss.Prelude;
|
||||||
|
import haxe.io.Path;
|
||||||
|
|
||||||
|
@:build(kiss.Kiss.build("src/Main.kiss"))
|
||||||
class Main {
|
class Main {
|
||||||
|
// TODO support EMeta(s:MetadataEntry, e:Expr) via Kiss
|
||||||
@:expose("activate")
|
@:expose("activate")
|
||||||
static function activate(context:ExtensionContext) {
|
static function activate(context:ExtensionContext) {
|
||||||
context.subscriptions.push(Vscode.commands.registerCommand("kiss.sayHello", function() {
|
_activate(context);
|
||||||
Vscode.window.showInformationMessage("Hello from Haxe!");
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
19
projects/kiss-vscode/src/Main.kiss
Normal file
19
projects/kiss-vscode/src/Main.kiss
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
(defun userConfigDir []
|
||||||
|
(Path.join [
|
||||||
|
(or (Sys.getEnv "MSYSHOME") (Sys.getEnv "HOME") (Sys.getEnv "UserProfile"))
|
||||||
|
".kiss"]))
|
||||||
|
|
||||||
|
(defvar &mut activeConfigDir "")
|
||||||
|
|
||||||
|
// (defun tryLoadConfig [&opt selectedText]
|
||||||
|
// )
|
||||||
|
|
||||||
|
(defun _activate [:ExtensionContext context]
|
||||||
|
(set activeConfigDir (Path.join [context.extensionPath "config"]))
|
||||||
|
(print "yyooooo")
|
||||||
|
|
||||||
|
(context.subscriptions.push
|
||||||
|
(Vscode.commands.registerCommand
|
||||||
|
"kiss-vscode.sayHello"
|
||||||
|
(lambda []
|
||||||
|
(Vscode.window.showInformationMessage "Hello from Haxe!")))))
|
||||||
Reference in New Issue
Block a user