From 16869aa5b66cd24974cd67faaa42977f29065672 Mon Sep 17 00:00:00 2001 From: tel0065 <77864718+tel0065@users.noreply.github.com> Date: Wed, 27 Apr 2022 11:59:16 -0500 Subject: [PATCH] Added linehighlighter added linehighlighter to be activated --- src/extension.ts | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 5496408..2aa31e5 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,49 +1,46 @@ -import * as vscode from 'vscode'; -import * as pl from './pylex'; +import * as vscode from "vscode"; +import * as pl from "./pylex"; +import CommandNodeProvider from "./commandNodeProvider"; +import Logger from "./log"; +import { lineHighlighter } from "./lineHighlighter"; -import { - accessCommands, - hubCommands, - navCommands, - textCommands -} from './commands'; - -import CommandNodeProvider from './commandNodeProvider'; -import Logger from './log'; +import { accessCommands, hubCommands, navCommands, textCommands } from "./commands"; // Output Logger -const product: string = vscode.workspace.getConfiguration('mindReader').get('productType')!; -const outputChannel = vscode.window.createOutputChannel(product + " Output"); -export const logger = new Logger(outputChannel); +const product: string = vscode.workspace.getConfiguration("mindReader").get("productType")!; +const outputChannel = vscode.window.createOutputChannel(product + " Output"); +export const logger = new Logger(outputChannel); let parser: pl.Parser = new pl.Parser(); export function activate(context: vscode.ExtensionContext) { - vscode.window.showInformationMessage('Mind_Reader is loaded!'); + vscode.window.showInformationMessage("Mind_Reader is loaded!"); - parser.parse('Beep Boop'); + lineHighlighter(); + + parser.parse("Beep Boop"); const allCommands = [ accessCommands, hubCommands, navCommands, - textCommands + textCommands, ].flat(1); // Register Commands - allCommands.forEach(command => { - let disposable = vscode.commands.registerCommand( - command.name, - command.callback + allCommands.forEach((command) => { + context.subscriptions.push( + vscode.commands.registerCommand(command.name, command.callback) ); - context.subscriptions.push(disposable); }); - let accessProvider = new CommandNodeProvider([accessCommands, textCommands].flat(1)); - vscode.window.registerTreeDataProvider('accessActions', accessProvider); + let accessProvider = new CommandNodeProvider( + [accessCommands, textCommands].flat(1) + ); + vscode.window.registerTreeDataProvider("accessActions", accessProvider); let hubProvider = new CommandNodeProvider(hubCommands); - vscode.window.registerTreeDataProvider('hubActions', hubProvider); + vscode.window.registerTreeDataProvider("hubActions", hubProvider); } export function deactivate() {}