"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.activate = activate;
exports.deactivate = deactivate;
const vscode_1 = require("vscode");
const node_1 = require("vscode-languageclient/node");
let client;
function activate(context) {
    const outputChannel = vscode_1.window.createOutputChannel('My Language Server');
    outputChannel.appendLine('Extension activating...');
    const serverExecutable = '/home/oliste/repos/nub-lang/compiler/NubLang.LSP/bin/Debug/net9.0/NubLang.LSP';
    outputChannel.appendLine(`Server path: ${serverExecutable}`);
    client = new node_1.LanguageClient('nub-lang', 'nub lang', {
        run: {
            command: serverExecutable,
            transport: node_1.TransportKind.stdio,
        },
        debug: {
            command: serverExecutable,
            transport: node_1.TransportKind.stdio,
            args: ['--debug'],
        }
    }, {
        documentSelector: [
            { scheme: 'file', language: 'nub' },
            { scheme: 'file', pattern: '**/*.nub' }
        ],
        synchronize: {
            fileEvents: vscode_1.workspace.createFileSystemWatcher('**/.clientrc')
        }
    });
    client.start();
}
function deactivate() {
    if (!client) {
        return undefined;
    }
    return client.stop();
}
//# sourceMappingURL=extension.js.map