更新 sv 高亮语法 | 更新 i18n
This commit is contained in:
parent
e4c8f3cfb1
commit
e12941c704
@ -27,5 +27,8 @@
|
|||||||
{"open":"[", "close":"]", "notIn":["string", "comment"]},
|
{"open":"[", "close":"]", "notIn":["string", "comment"]},
|
||||||
{"open":"{", "close":"}", "notIn":["string", "comment"]},
|
{"open":"{", "close":"}", "notIn":["string", "comment"]},
|
||||||
{"open":"\"", "close":"\"", "notIn":["string", "comment"]}
|
{"open":"\"", "close":"\"", "notIn":["string", "comment"]}
|
||||||
]
|
],
|
||||||
|
"onTypeFormatting": {
|
||||||
|
"autoFormatTriggerCharacters": ["\n"]
|
||||||
|
}
|
||||||
}
|
}
|
@ -13,11 +13,13 @@
|
|||||||
["module", "endmodule"],
|
["module", "endmodule"],
|
||||||
["task", "endtask"]
|
["task", "endtask"]
|
||||||
],
|
],
|
||||||
|
|
||||||
"autoClosingPairs": [
|
"autoClosingPairs": [
|
||||||
{"open":"(", "close":")", "notIn":["string", "comment"]},
|
{"open":"(", "close":")", "notIn":["string", "comment"]},
|
||||||
{"open":"[", "close":"]", "notIn":["string", "comment"]},
|
{"open":"[", "close":"]", "notIn":["string", "comment"]},
|
||||||
{"open":"{", "close":"}", "notIn":["string", "comment"]},
|
{"open":"{", "close":"}", "notIn":["string", "comment"]},
|
||||||
{"open":"\"", "close":"\"", "notIn":["string", "comment"]}
|
{"open":"\"", "close":"\"", "notIn":["string", "comment"]}
|
||||||
]
|
],
|
||||||
|
"onTypeFormatting": {
|
||||||
|
"autoFormatTriggerCharacters": ["\n"]
|
||||||
|
}
|
||||||
}
|
}
|
@ -22,5 +22,8 @@
|
|||||||
["(", ")"],
|
["(", ")"],
|
||||||
["\"", "\""],
|
["\"", "\""],
|
||||||
["'", "'"]
|
["'", "'"]
|
||||||
]
|
],
|
||||||
|
"onTypeFormatting": {
|
||||||
|
"autoFormatTriggerCharacters": ["\n"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -293,6 +293,11 @@
|
|||||||
"description": "auto declare output type nets in the scope when instantiation happens.",
|
"description": "auto declare output type nets in the scope when instantiation happens.",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
|
},
|
||||||
|
"fpga-support.onTypeFormattingTriggerCharacters": {
|
||||||
|
"type": "array",
|
||||||
|
"default": ["\n"],
|
||||||
|
"description": "Trigger characters for onTypeFormatting"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -788,7 +793,7 @@
|
|||||||
"activitybar": [
|
"activitybar": [
|
||||||
{
|
{
|
||||||
"id": "TreeView",
|
"id": "TreeView",
|
||||||
"title": "Digital-IDE: TreeView",
|
"title": "%digital-ide.treeview%",
|
||||||
"icon": "images/svg/view.svg"
|
"icon": "images/svg/view.svg"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -46,5 +46,6 @@
|
|||||||
"digital-ide.lsp.svlog.linter.pick.title": "select a diagnostic for systemverilog verilog",
|
"digital-ide.lsp.svlog.linter.pick.title": "select a diagnostic for systemverilog verilog",
|
||||||
"digital-ide.lsp.vhdl.linter.pick.title": "select a diagnostic for vhdl",
|
"digital-ide.lsp.vhdl.linter.pick.title": "select a diagnostic for vhdl",
|
||||||
"digital-ide.lsp.systemverilog.linter.pick.title": "select a diagnostic for systemverilog",
|
"digital-ide.lsp.systemverilog.linter.pick.title": "select a diagnostic for systemverilog",
|
||||||
"digital-ide.tool.export-filelist.title": "export filelist"
|
"digital-ide.tool.export-filelist.title": "export filelist",
|
||||||
|
"digital-ide.treeview": "Digital IDE: TreeView"
|
||||||
}
|
}
|
@ -7,18 +7,18 @@
|
|||||||
"digital-ide.tool.instance.title": "生成选中 module 的例化模板",
|
"digital-ide.tool.instance.title": "生成选中 module 的例化模板",
|
||||||
"digital-ide.tool.testbench.title": "从当前文件中选择 module 生成 testbench",
|
"digital-ide.tool.testbench.title": "从当前文件中选择 module 生成 testbench",
|
||||||
"digital-ide.tool.icarus.simulateFile.title": "对当前文件进行仿真",
|
"digital-ide.tool.icarus.simulateFile.title": "对当前文件进行仿真",
|
||||||
"digital-ide.treeView.arch.expand.title": "扩大树视图中的所有项目",
|
"digital-ide.treeView.arch.expand.title": "展开视图中的所有项目",
|
||||||
"digital-ide.treeView.arch.collapse.title": "崩溃树视图中的所有项目",
|
"digital-ide.treeView.arch.collapse.title": "收起视图中的所有项目",
|
||||||
"digital-ide.treeView.arch.refresh.title": "刷新树视图",
|
"digital-ide.treeView.arch.refresh.title": "刷新树视图",
|
||||||
"digital-ide.treeView.arch.openFile.title": "在树视图打开相应的文件",
|
"digital-ide.treeView.arch.openFile.title": "在树视图打开相应的文件",
|
||||||
"digital-ide.tool.clean.title": "干净的当前项目",
|
"digital-ide.tool.clean.title": "清理的当前项目",
|
||||||
"digital-ide.soft.launch.title": "启动SDK开发辅助功能",
|
"digital-ide.soft.launch.title": "启动SDK开发辅助功能",
|
||||||
"digital-ide.soft.build.title": "建立项目当前的SDK",
|
"digital-ide.soft.build.title": "建立项目当前的SDK",
|
||||||
"digital-ide.soft.download.title": "下载文件到设备引导",
|
"digital-ide.soft.download.title": "下载文件到设备引导",
|
||||||
"digital-ide.hard.launch.title": "启动FPGA开发辅助功能",
|
"digital-ide.hard.launch.title": "启动FPGA开发辅助功能",
|
||||||
"digital-ide.hard.simulate.title": "启动生产仿真",
|
"digital-ide.hard.simulate.title": "启动生产仿真",
|
||||||
"digital-ide.hard.simulate.cli.title": "在CLI推出制造商模拟",
|
"digital-ide.hard.simulate.cli.title": "CLI",
|
||||||
"digital-ide.hard.simulate.gui.title": "在GUI推出制造商模拟",
|
"digital-ide.hard.simulate.gui.title": "GUI",
|
||||||
"digital-ide.hard.refresh.title": "刷新当前的项目文件",
|
"digital-ide.hard.refresh.title": "刷新当前的项目文件",
|
||||||
"digital-ide.hard.build.title": "fpga构建当前项目",
|
"digital-ide.hard.build.title": "fpga构建当前项目",
|
||||||
"digital-ide.hard.build.synth.title": "Synth当前项目",
|
"digital-ide.hard.build.synth.title": "Synth当前项目",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
"digital-ide.hard.program.title": "下载文件到设备",
|
"digital-ide.hard.program.title": "下载文件到设备",
|
||||||
"digital-ide.hard.gui.title": "打开界面",
|
"digital-ide.hard.gui.title": "打开界面",
|
||||||
"digital-ide.hard.exit.title": "退出当前项目",
|
"digital-ide.hard.exit.title": "退出当前项目",
|
||||||
"digital-ide.pickLibrary.title": "从自定义选择自由和普遍",
|
"digital-ide.pickLibrary.title": "选择库文件",
|
||||||
"digital-ide.pl.setSrcTop.title": "设置为 src 的顶层文件",
|
"digital-ide.pl.setSrcTop.title": "设置为 src 的顶层文件",
|
||||||
"digital-ide.pl.setSimTop.title": "设置为 sim 的顶层文件",
|
"digital-ide.pl.setSimTop.title": "设置为 sim 的顶层文件",
|
||||||
"digital-ide.pl.addDevice.title": "添加 device",
|
"digital-ide.pl.addDevice.title": "添加 device",
|
||||||
@ -46,5 +46,6 @@
|
|||||||
"digital-ide.lsp.svlog.linter.pick.title": "选择 System Verilog 的诊断",
|
"digital-ide.lsp.svlog.linter.pick.title": "选择 System Verilog 的诊断",
|
||||||
"digital-ide.lsp.vhdl.linter.pick.title": "选择 VHDL 的诊断",
|
"digital-ide.lsp.vhdl.linter.pick.title": "选择 VHDL 的诊断",
|
||||||
"digital-ide.lsp.systemverilog.linter.pick.title": "选择 SystemVerilog 的诊断",
|
"digital-ide.lsp.systemverilog.linter.pick.title": "选择 SystemVerilog 的诊断",
|
||||||
"digital-ide.tool.export-filelist.title": "导出 filelist"
|
"digital-ide.tool.export-filelist.title": "导出 filelist",
|
||||||
|
"digital-ide.treeview": "Digital IDE: 模块树"
|
||||||
}
|
}
|
@ -46,5 +46,6 @@
|
|||||||
"digital-ide.lsp.svlog.linter.pick.title": "選擇 System Verilog 的診斷",
|
"digital-ide.lsp.svlog.linter.pick.title": "選擇 System Verilog 的診斷",
|
||||||
"digital-ide.lsp.vhdl.linter.pick.title": "選擇 VHDL 的診斷",
|
"digital-ide.lsp.vhdl.linter.pick.title": "選擇 VHDL 的診斷",
|
||||||
"digital-ide.lsp.systemverilog.linter.pick.title": "選擇 SystemVerilog 的診斷",
|
"digital-ide.lsp.systemverilog.linter.pick.title": "選擇 SystemVerilog 的診斷",
|
||||||
"digital-ide.tool.export-filelist.title": "導出 filelist"
|
"digital-ide.tool.export-filelist.title": "導出 filelist",
|
||||||
|
"digital-ide.treeview": "Digital IDE: 模块树"
|
||||||
}
|
}
|
@ -21,7 +21,7 @@ async function registerCommand(context: vscode.ExtensionContext) {
|
|||||||
func.registerWaveViewer(context);
|
func.registerWaveViewer(context);
|
||||||
|
|
||||||
lspClient.activate(context);
|
lspClient.activate(context);
|
||||||
await LspClient.MainClient?.onReady();
|
await LspClient.DigitalIDE?.onReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function launch(context: vscode.ExtensionContext) {
|
async function launch(context: vscode.ExtensionContext) {
|
||||||
|
@ -85,10 +85,10 @@ function registerLsp(context: vscode.ExtensionContext) {
|
|||||||
|
|
||||||
|
|
||||||
// vhdl lsp
|
// vhdl lsp
|
||||||
vscode.languages.registerDocumentSymbolProvider(vhdlSelector, lspDocSymbol.vhdlDocSymbolProvider);
|
// vscode.languages.registerDocumentSymbolProvider(vhdlSelector, lspDocSymbol.vhdlDocSymbolProvider);
|
||||||
vscode.languages.registerDefinitionProvider(vhdlSelector, lspDefinition.vhdlDefinitionProvider);
|
// vscode.languages.registerDefinitionProvider(vhdlSelector, lspDefinition.vhdlDefinitionProvider);
|
||||||
vscode.languages.registerHoverProvider(vhdlSelector, lspHover.vhdlHoverProvider);
|
// vscode.languages.registerHoverProvider(vhdlSelector, lspHover.vhdlHoverProvider);
|
||||||
vscode.languages.registerCompletionItemProvider(vhdlSelector, lspCompletion.vhdlCompletionProvider);
|
// vscode.languages.registerCompletionItemProvider(vhdlSelector, lspCompletion.vhdlCompletionProvider);
|
||||||
|
|
||||||
|
|
||||||
// tcl lsp
|
// tcl lsp
|
||||||
|
@ -59,6 +59,9 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
language: 'vhdl'
|
language: 'vhdl'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
markdown: {
|
||||||
|
isTrusted: true
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const client = new LanguageClient(
|
const client = new LanguageClient(
|
||||||
@ -67,15 +70,15 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
serverOptions,
|
serverOptions,
|
||||||
clientOptions
|
clientOptions
|
||||||
);
|
);
|
||||||
LspClient.MainClient = client;
|
LspClient.DigitalIDE = client;
|
||||||
|
|
||||||
client.start();
|
client.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deactivate(): Thenable<void> | undefined {
|
export function deactivate(): Thenable<void> | undefined {
|
||||||
if (!LspClient.MainClient) {
|
if (!LspClient.DigitalIDE) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
return LspClient.MainClient.stop();
|
return LspClient.DigitalIDE.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,12 +4,12 @@ import { Fast } from '../../resources/hdlParser';
|
|||||||
|
|
||||||
|
|
||||||
interface IDigitalIDELspClient {
|
interface IDigitalIDELspClient {
|
||||||
MainClient?: LanguageClient,
|
DigitalIDE?: LanguageClient,
|
||||||
VhdlClient?: LanguageClient
|
VhdlClient?: LanguageClient
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LspClient: IDigitalIDELspClient = {
|
export const LspClient: IDigitalIDELspClient = {
|
||||||
MainClient: undefined,
|
DigitalIDE: undefined,
|
||||||
VhdlClient: undefined
|
VhdlClient: undefined
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -257,6 +257,15 @@ class HdlParam {
|
|||||||
|
|
||||||
progress?.report({ message: reportTitle + ` ${1}/${fileNum}`, increment: 0 });
|
progress?.report({ message: reportTitle + ` ${1}/${fileNum}`, increment: 0 });
|
||||||
|
|
||||||
|
// for (const path of hdlFiles) {
|
||||||
|
// count ++;
|
||||||
|
// console.log('send request: ' + path);
|
||||||
|
|
||||||
|
// await this.doHdlFast(path);
|
||||||
|
// const increment = Math.floor(count / fileNum * 100);
|
||||||
|
// progress?.report({ message: reportTitle + ` ${count}/${fileNum}`, increment });
|
||||||
|
// }
|
||||||
|
|
||||||
async function consumePools() {
|
async function consumePools() {
|
||||||
for (const p of pools) {
|
for (const p of pools) {
|
||||||
const increment = Math.floor(p.id / fileNum * 100);
|
const increment = Math.floor(p.id / fileNum * 100);
|
||||||
@ -575,7 +584,7 @@ class HdlModule {
|
|||||||
this.path,
|
this.path,
|
||||||
common.InstModPathStatus.Current,
|
common.InstModPathStatus.Current,
|
||||||
rawHdlInstance.instparams,
|
rawHdlInstance.instparams,
|
||||||
this.ports[0].range,
|
rawHdlInstance.instports,
|
||||||
rawHdlInstance.range,
|
rawHdlInstance.range,
|
||||||
this);
|
this);
|
||||||
hdlInstance.module = this;
|
hdlInstance.module = this;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { Fast, vlogAll, vhdlAll, svAll, vhdlFast, All } from '../../resources/hdlParser';
|
import { Fast, vlogAll, vhdlAll, svAll, All } from '../../resources/hdlParser';
|
||||||
import { hdlFile } from '../hdlFs';
|
import { hdlFile } from '../hdlFs';
|
||||||
import { HdlLangID } from '../global/enum';
|
import { HdlLangID } from '../global/enum';
|
||||||
import { AbsPath, LspClient } from '../global';
|
import { AbsPath, LspClient } from '../global';
|
||||||
@ -8,7 +8,7 @@ import { RawHdlModule } from './common';
|
|||||||
|
|
||||||
async function doFastApi(path: string): Promise<Fast | undefined> {
|
async function doFastApi(path: string): Promise<Fast | undefined> {
|
||||||
try {
|
try {
|
||||||
const client = LspClient.MainClient;
|
const client = LspClient.DigitalIDE;
|
||||||
const langID = hdlFile.getLanguageId(path);
|
const langID = hdlFile.getLanguageId(path);
|
||||||
if (client) {
|
if (client) {
|
||||||
const response = await client.sendRequest(DoFastRequestType, { path });
|
const response = await client.sendRequest(DoFastRequestType, { path });
|
||||||
@ -32,6 +32,11 @@ async function svFast(path: string): Promise<Fast | undefined> {
|
|||||||
return fast;
|
return fast;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function vhdlFast(path: string): Promise<Fast | undefined> {
|
||||||
|
const fast = await doFastApi(path);
|
||||||
|
return fast;
|
||||||
|
}
|
||||||
|
|
||||||
namespace HdlSymbol {
|
namespace HdlSymbol {
|
||||||
/**
|
/**
|
||||||
* @description 计算出模块级的信息
|
* @description 计算出模块级的信息
|
||||||
|
@ -155,7 +155,7 @@ class PrjManage {
|
|||||||
MainOutput.report(`finish analyse ${hdlFiles.length} hdl files, find ${unhandleNum} unsolved instances`, ReportType.Info);
|
MainOutput.report(`finish analyse ${hdlFiles.length} hdl files, find ${unhandleNum} unsolved instances`, ReportType.Info);
|
||||||
|
|
||||||
// 完成后端向前端发送消息的注册
|
// 完成后端向前端发送消息的注册
|
||||||
const mainClient = LspClient.MainClient;
|
const mainClient = LspClient.DigitalIDE;
|
||||||
if (mainClient !== undefined) {
|
if (mainClient !== undefined) {
|
||||||
await mainClient.onReady();
|
await mainClient.onReady();
|
||||||
mainClient.onNotification('update/fast', async (params: any) => {
|
mainClient.onNotification('update/fast', async (params: any) => {
|
||||||
|
1044
syntaxes/systemverilog.backup.json
Normal file
1044
syntaxes/systemverilog.backup.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user