VS Code language support for FuseSoC core description files (.core).
CAPI=2:) highlighted distinctlyname, filesets, targets, parameters, …) emphasizedverilogSource, systemVerilogSource, vhdlSource, …) colored as constantsvlogparam, vlogdefine, generic, …) and data types (int, bool, str, …) styled separatelyicarus, vivado, quartus, nextpnr, …) highlightedvendor:library:name:version) with per-segment coloringDiagnostics are shown inline as you type:
| Check | Severity |
|---|---|
| Missing or invalid CAPI header | Error |
| YAML parse errors | Error |
Missing required name field |
Error |
| Invalid core name format | Error |
filesets / targets / parameters not a mapping |
Error |
Fileset files not a list |
Error |
| Unknown fileset referenced in a target | Error |
Unknown file_type value |
Warning |
Unknown paramtype / datatype value |
Warning |
Missing paramtype in a parameter |
Warning |
| Unknown keys at any level | Warning |
| CAPI=1 deprecated format | Information |
| File | Description |
|---|---|
*.core |
FuseSoC CAPI2 core description files |
fusesoc.conf |
FuseSoC configuration file |
CAPI=2:
name: vendor:library:core-name:1.0.0
description: "Short description"
filesets:
rtl:
files:
- src/top.sv
file_type: systemVerilogSource
targets:
default:
filesets:
- rtl
toplevel: top
parameters:
MY_PARAM:
datatype: int
default: 0
paramtype: vlogparam
No external tools required. The extension works purely from file content.
Linting is split across two modules:
src/linter-core.ts is pure logic with no vscode import, so it runs in plain Node and is unit-testable without the extension host. Its entry point is lintText(text, fileExists?, baseDir?), which returns a LintIssue[]. fileExists/baseDir are optional and only used to check that files referenced under filesets.*.files exist on disk; omit them and that check is skipped, keeping the function pure.src/linter.ts (CoreLinter) adapts that output for the editor: it calls lintText with fs.existsSync and the document's directory, then maps each LintIssue to a vscode.Diagnostic via IssueSeverity → vscode.DiagnosticSeverity.To add a new lint rule, write a lint* function following the existing pattern (e.g. lintParameters, lintFilesets) and call it from lintCAPI2 (or the relevant parent check). Push findings with the makeIssue helper for whole-line positioning, or findKeyLine/findValueLine to locate a specific key or value's line number in the source text.
Issues and pull requests welcome at the project repository.