diff --git a/l10n/bundle.l10n.de.json b/l10n/bundle.l10n.de.json index 6d4ae04..1188a99 100644 --- a/l10n/bundle.l10n.de.json +++ b/l10n/bundle.l10n.de.json @@ -26,5 +26,6 @@ "info.welcome.join-qq-group": "Klicken Sie auf den Link, um der QQ-Gruppe beizutreten", "info.level.test": "Dies ist ein einfaches Beispiel", "info.progress.build-ip-module-tree": "构建 IP 模块树", - "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核" + "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核", + "info.progress.initialize-configure": "初始化项目配置" } \ No newline at end of file diff --git a/l10n/bundle.l10n.en.json b/l10n/bundle.l10n.en.json index bcb3f74..b3ef89f 100644 --- a/l10n/bundle.l10n.en.json +++ b/l10n/bundle.l10n.en.json @@ -26,5 +26,6 @@ "info.welcome.join-qq-group": "Click the link to join the QQ group", "info.level.test": "This is a simple example", "info.progress.build-ip-module-tree": "构建 IP 模块树", - "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核" + "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核", + "info.progress.initialize-configure": "初始化项目配置" } \ No newline at end of file diff --git a/l10n/bundle.l10n.ja.json b/l10n/bundle.l10n.ja.json index 11db163..ddb0d55 100644 --- a/l10n/bundle.l10n.ja.json +++ b/l10n/bundle.l10n.ja.json @@ -26,5 +26,6 @@ "info.welcome.join-qq-group": "リンクをクリックして QQ グループに参加", "info.level.test": "これは簡単な例です", "info.progress.build-ip-module-tree": "构建 IP 模块树", - "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核" + "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核", + "info.progress.initialize-configure": "初始化项目配置" } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-cn.json b/l10n/bundle.l10n.zh-cn.json index 2372182..aab56f5 100644 --- a/l10n/bundle.l10n.zh-cn.json +++ b/l10n/bundle.l10n.zh-cn.json @@ -26,5 +26,6 @@ "info.welcome.join-qq-group": "点击链接加入 QQ 群", "info.level.test": "这是一个简单的样例", "info.progress.build-ip-module-tree": "构建 IP 模块树", - "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核" + "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核", + "info.progress.initialize-configure": "初始化项目配置" } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-tw.json b/l10n/bundle.l10n.zh-tw.json index 163a249..6031860 100644 --- a/l10n/bundle.l10n.zh-tw.json +++ b/l10n/bundle.l10n.zh-tw.json @@ -26,5 +26,6 @@ "info.welcome.join-qq-group": "點擊鏈接加入 QQ 群", "info.level.test": "這是一個簡單的樣例", "info.progress.build-ip-module-tree": "构建 IP 模块树", - "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核" + "info.treeview.ip-no-active.message": "当前 IP 还未激活,请通过 Xilinx 工具链将 XCI 文件生成完整的 IP 核", + "info.progress.initialize-configure": "初始化项目配置" } \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 82cf4e2..b33c903 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -44,7 +44,23 @@ async function launch(context: vscode.ExtensionContext) { await registerCommand(context, versionString); }); - await lspClient.activate(context, versionString); + await vscode.window.withProgress({ + location: vscode.ProgressLocation.Window, + title: t('info.progress.initialize-configure') + }, async () => { + // 初始化 OpeParam + // 包含基本的插件的文件系统信息、用户配置文件和系统配置文件的合并数据结构 + const refreshPrjConfig = await manager.prjManage.initOpeParam(context); + MainOutput.report('finish initialise opeParam', ReportType.Info); + manager.prjManage.refreshPrjFolder(refreshPrjConfig); + }); + + await vscode.window.withProgress({ + location: vscode.ProgressLocation.Window, + title: "启动 Digital LSP 语言服务器" + }, async () => { + await lspClient.activate(context, versionString); + }); await vscode.window.withProgress({ location: vscode.ProgressLocation.Window, @@ -63,9 +79,7 @@ async function launch(context: vscode.ExtensionContext) { }); - MainOutput.report('Digital-IDE has launched, Version: ' + versionString, ReportType.Launch); - MainOutput.report('OS: ' + opeParam.os, ReportType.Launch); - + MainOutput.report('Digital-IDE 已经启动,当前版本:' + versionString, ReportType.Launch); console.log(hdlParam); // show welcome information (if first install) diff --git a/src/function/lsp-client/index.ts b/src/function/lsp-client/index.ts index c141c2f..4394a22 100644 --- a/src/function/lsp-client/index.ts +++ b/src/function/lsp-client/index.ts @@ -11,7 +11,7 @@ import * as fs from 'fs'; import * as zlib from 'zlib'; import * as tar from 'tar'; import { platform } from "os"; -import { IProgress, LspClient } from '../../global'; +import { IProgress, LspClient, opeParam } from '../../global'; import axios, { AxiosResponse } from "axios"; import { chooseBestDownloadSource, getGiteeDownloadLink, getGithubDownloadLink, getPlatformPlatformSignature } from "./cdn"; import { hdlDir, hdlPath } from "../../hdlFs"; @@ -166,11 +166,21 @@ export async function activate(context: vscode.ExtensionContext, version: string debug: run, }; + let workspaceFolder: undefined | { uri: vscode.Uri, name: string, index: number } = undefined; + if (vscode.workspace.workspaceFolders) { + const currentWsFolder = vscode.workspace.workspaceFolders[0]; + workspaceFolder = currentWsFolder; + } + + let extensionPath = hdlPath.toSlash(context.extensionPath); + + vscode.window.showInformationMessage("toolchain: " + opeParam.prjInfo.toolChain); + let clientOptions: LanguageClientOptions = { documentSelector: [ { scheme: 'file', - language: 'systemverilog' + language: 'systemverilog' }, { scheme: 'file', @@ -183,7 +193,13 @@ export async function activate(context: vscode.ExtensionContext, version: string ], progressOnInitialization: true, markdown: { - isTrusted: true + isTrusted: true, + supportHtml: true + }, + workspaceFolder, + initializationOptions: { + extensionPath, + toolChain: opeParam.prjInfo.toolChain } }; diff --git a/src/manager/prj.ts b/src/manager/prj.ts index c0d0717..6e8d84c 100644 --- a/src/manager/prj.ts +++ b/src/manager/prj.ts @@ -175,11 +175,6 @@ class PrjManage { console.time('launch'); } - // 初始化 OpeParam - // 包含基本的插件的文件系统信息、用户配置文件和系统配置文件的合并数据结构 - const refreshPrjConfig = await this.initOpeParam(context); - MainOutput.report('finish initialise opeParam', ReportType.Info); - prjManage.refreshPrjFolder(refreshPrjConfig); // 解析 hdl 文件,构建 hdlParam const hdlFiles = await this.getPrjHardwareFiles();