Show me errors
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
import { CommandParser, CommandInfo, CommandParameter } from './commandParser';
|
||||
import { ASHESDiagnosticProvider } from './diagnosticProvider';
|
||||
|
||||
// Cache for dynamically loaded commands
|
||||
let ASHES_COMMANDS: Array<{name: string, description: string, parameters: CommandParameter[], filePath?: string}> = [];
|
||||
@@ -59,6 +60,10 @@ function getCommands(workspaceRoot: string): Array<{name: string, description: s
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
console.log('ASHES Language Support extension is now active!');
|
||||
|
||||
// Initialize diagnostic provider for syntax error detection
|
||||
const diagnosticProvider = new ASHESDiagnosticProvider();
|
||||
diagnosticProvider.initialize(context);
|
||||
|
||||
// Register completion provider
|
||||
const completionProvider = vscode.languages.registerCompletionItemProvider(
|
||||
'ashes',
|
||||
@@ -458,10 +463,19 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
ASHES_COMMANDS = [];
|
||||
COMMAND_CACHE_TIMESTAMP = 0;
|
||||
|
||||
vscode.window.showInformationMessage('ASHES commands cache refreshed!');
|
||||
// Also refresh diagnostics
|
||||
diagnosticProvider.refreshAllDiagnostics();
|
||||
|
||||
vscode.window.showInformationMessage('ASHES commands cache and diagnostics refreshed!');
|
||||
});
|
||||
|
||||
context.subscriptions.push(completionProvider, hoverProvider, definitionProvider, showCommandReference, refreshCommands);
|
||||
// Register command for refreshing diagnostics only
|
||||
const refreshDiagnostics = vscode.commands.registerCommand('ashes.refreshDiagnostics', () => {
|
||||
diagnosticProvider.refreshAllDiagnostics();
|
||||
vscode.window.showInformationMessage('ASHES diagnostics refreshed!');
|
||||
});
|
||||
|
||||
context.subscriptions.push(completionProvider, hoverProvider, definitionProvider, showCommandReference, refreshCommands, refreshDiagnostics);
|
||||
}
|
||||
|
||||
export function deactivate() {}
|
||||
|
||||
Reference in New Issue
Block a user