Skip to content

Commit 59955ff

Browse files
committed
Fix regex syntax and add activation debugging
1 parent da14b5e commit 59955ff

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

client/src/extension.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ let client: LanguageClient;
2424
* Called when the extension is activated (when NMTRAN files are opened)
2525
*/
2626
export function activate(context: vscode.ExtensionContext) {
27+
console.log('🚀 NMTRAN Extension: Starting activation...');
28+
2729
// =================================================================
2830
// FEATURE 1: Code Folding
2931
// =================================================================
@@ -132,7 +134,12 @@ export function activate(context: vscode.ExtensionContext) {
132134
);
133135

134136
// Start the language server
135-
client.start();
137+
console.log('🔄 NMTRAN Extension: Starting language server...');
138+
client.start().then(() => {
139+
console.log('✅ NMTRAN Extension: Language server started successfully');
140+
}).catch((error) => {
141+
console.error('❌ NMTRAN Extension: Failed to start language server:', error);
142+
});
136143

137144
// Auto-show language server logs when debugging
138145
if (process.env.VSCODE_DEBUG_MODE === 'true') {
@@ -144,6 +151,8 @@ export function activate(context: vscode.ExtensionContext) {
144151

145152
// Register our features with VSCode so they get cleaned up properly
146153
context.subscriptions.push(foldingProvider);
154+
155+
console.log('✨ NMTRAN Extension: Activation completed successfully');
147156
}
148157

149158
/**

language-configuration.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
["\"", "\""],
2525
["`", "`"]
2626
],
27-
"wordPattern": "(?i)\\b(THETA|ETA|EPS|ERR)\\(\\d+\\)|\\$[A-Z]+|\\b[A-Z_][A-Z0-9_]*\\b|\\b[a-z_][a-zA-Z0-9_]*\\b|(?:\\.(?:EQ|NE|LE|GE|LT|GT|AND|OR)\\.)|(?:==|/=|<=|>=|<|>)",
27+
"wordPattern": "\\b(THETA|ETA|EPS|ERR)\\(\\d+\\)|\\$[A-Z]+|\\b[A-Z_][A-Z0-9_]*\\b|\\b[a-z_][a-zA-Z0-9_]*\\b|(?:\\.(?:EQ|NE|LE|GE|LT|GT|AND|OR)\\.)|(?:==|/=|<=|>=|<|>)",
2828
"folding": {
2929
"markers": {
30-
"start": "(?i)^\\s*IF\\s*.*\\s*THEN\\s*$|^\\$[A-Z]+",
31-
"end": "(?i)^\\s*ENDIF\\s*$|^\\$[A-Z]+"
30+
"start": "^\\s*IF\\s*.*\\s*THEN\\s*$|^\\$[A-Z]+",
31+
"end": "^\\s*ENDIF\\s*$|^\\$[A-Z]+"
3232
}
3333
}
3434
}

0 commit comments

Comments
 (0)