Skip to content

Commit 62956c4

Browse files
committed
update to 0.1.3
1 parent 67062c4 commit 62956c4

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
66

77
## [Unreleased]
88

9+
## [0.1.3]
10+
911
- fix typo
1012
- use absolute path for GHCi
1113
- add activation event (in a stack project)

src/config.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as vscode from 'vscode';
2-
import * as option from './option';
32

43
export type Config = {
54
stackPath: string,
@@ -9,14 +8,11 @@ export type Config = {
98

109
export function getConfig(): Config {
1110
const config = vscode.workspace.getConfiguration();
12-
function getConfOption<T>(name: string, def: T): T {
13-
return option.option<T>(config.get(name)).orelse(def);
14-
}
15-
let stack = getConfOption("runner2.stackPath", "stack");
16-
let repl = getConfOption("runner2.stackRepl", false);
11+
let stack = config.get("runner2.stackPath", "stack");
12+
let repl = config.get("runner2.stackRepl", false);
1713
return {
1814
stackPath: stack,
1915
ghciTool: repl ? (stack + " repl") : "ghci",
20-
enableStackRun: getConfOption("runner2.stackRun", false)
16+
enableStackRun: config.get("runner2.stackRun", false)
2117
};
2218
}

src/util.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export function resgisterStatButton(
66
name: string,
77
command: string,
88
align = vscode.StatusBarAlignment.Left,
9-
priority = 10) {
10-
9+
priority = 10
10+
) {
1111
let stat = vscode.window.createStatusBarItem(align, priority);
1212
stat.text = name;
1313
stat.command = command;
@@ -18,9 +18,9 @@ export function resgisterStatButton(
1818
// create a terminal and send command
1919
export function registerSimplTerm(context: vscode.ExtensionContext, command: string, name: string, cmd: string) {
2020
context.subscriptions.push(vscode.commands.registerCommand(command, () => {
21-
let t = vscode.window.createTerminal(name);
22-
t.sendText(cmd);
23-
t.show();
21+
let term = vscode.window.createTerminal(name);
22+
term.sendText(cmd);
23+
term.show();
2424
}));
2525
}
2626

0 commit comments

Comments
 (0)