Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit f1bebe6

Browse files
author
Divyendu Singh
authored
Merge pull request #39 from prismagraphql/fix_extension_click
fix: extension click, replace popup with log
2 parents 8dbd84e + 0f9180c commit f1bebe6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/extension.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"use strict";
22
import * as path from "path";
3-
import { workspace, ExtensionContext, window, commands } from "vscode";
3+
import {
4+
workspace,
5+
ExtensionContext,
6+
window,
7+
commands,
8+
OutputChannel
9+
} from "vscode";
410
import {
511
LanguageClient,
612
LanguageClientOptions,
@@ -18,6 +24,9 @@ function getConfig() {
1824
}
1925

2026
export function activate(context: ExtensionContext) {
27+
let outputChannel: OutputChannel = window.createOutputChannel(
28+
"GraphQL Language Server"
29+
);
2130
const config = getConfig();
2231
const { debug } = config;
2332
if (debug) {
@@ -46,6 +55,7 @@ export function activate(context: ExtensionContext) {
4655
synchronize: {
4756
fileEvents: workspace.createFileSystemWatcher("**/*.{graphql,gql}")
4857
},
58+
outputChannel: outputChannel,
4959
outputChannelName: "GraphQL Language Server"
5060
};
5161

@@ -63,7 +73,7 @@ export function activate(context: ExtensionContext) {
6373
const disposableCommandDebug = commands.registerCommand(
6474
"extension.isDebugging",
6575
() => {
66-
window.showInformationMessage(`is in debug mode: ${!!debug}`);
76+
outputChannel.appendLine(`is in debug mode: ${!!debug}`);
6777
}
6878
);
6979
context.subscriptions.push(disposableCommandDebug);

0 commit comments

Comments
 (0)