From 348c7f1da1b66a8bb9b363f5357b0b112dd8e573 Mon Sep 17 00:00:00 2001 From: Alex Kanunnikov Date: Fri, 29 Mar 2024 10:47:16 +0300 Subject: [PATCH] chore: skip activation if official extension enabled --- package.json | 2 +- src/extension.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 17aec53..f865a04 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "(aka uELS, Unstable Ember Language Server), Provides features like auto complete, goto definition and diagnostics for Ember.js projects", "author": "Aleksandr Kanunnikov ", "license": "MIT", - "version": "3.0.53", + "version": "3.0.54", "publisher": "lifeart", "icon": "assets/icon.png", "keywords": [ diff --git a/src/extension.ts b/src/extension.ts index 6fcac77..ceeedd6 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -17,6 +17,7 @@ import { InputBoxOptions, StatusBarAlignment, Uri, + extensions, } from 'vscode'; import { isEmberCliProject, isGlimmerXProject } from './workspace-utils'; import { @@ -30,7 +31,12 @@ import { import { provideCodeLenses } from './lenses'; let ExtStatusBarItem: StatusBarItem; let ExtServerDebugBarItem: StatusBarItem; +const OFFICIAL_EMBER_LANGUAGE_SERVER = 'EmberTooling.vscode-ember'; export async function activate(context: ExtensionContext) { + const extension = extensions.getExtension(OFFICIAL_EMBER_LANGUAGE_SERVER); + if (extension && extension.isActive) { + return; + } // The server is implemented in node const serverModule = path.join(context.extensionPath, './start-server.js'); const config = workspace.getConfiguration('els');