diff --git a/package.json b/package.json index 0dc4001..e747ace 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "x86-assembly-syntax", "displayName": "Universal Assembly Syntax Highlighting", "description": "Syntax highlighting extension for x86, x64 and ARM assembly both for Intel and AT&T syntax", - "version": "1.0.7", + "version": "1.0.8", "engines": { "vscode": "^1.60.0" }, diff --git a/src/extension.js b/src/extension.js index 0e19564..50c7f5e 100644 --- a/src/extension.js +++ b/src/extension.js @@ -18,11 +18,12 @@ function activate(context) { return new vscode.Hover(instructionInfo); } } else { - return new vscode.Hover(`Unrecognized mnemonic: ${word}`); + // Only show hover for recognized mnemonics + return undefined; // Return undefined if not a valid mnemonic } } - return undefined; + return undefined; // Return undefined if no word found } }); @@ -82,7 +83,7 @@ async function fetchInstructionInfo(instruction) { async function findDefinition(word) { // Get all x86 assembly files in the workspace - const files = await vscode.workspace.findFiles('**/*.s', '**/node_modules/**'); + const files = await vscode.workspace.findFiles('**/*.s', '**/*.asm', '**/*.nasm', '**/*.S', "**/*.asmx", "**/*.inc"); for (const file of files) { const document = await vscode.workspace.openTextDocument(file);