Language Server Protocol implementation for SystemRDL 2.0 — diagnostics, hover, goto-def, completion, semantic tokens, and the full LSP feature surface (powered by systemrdl-compiler)
Project description
systemrdl-lsp
Language Server Protocol implementation for SystemRDL 2.0 — backed by
systemrdl-compiler and
pygls. Editor-agnostic; ships
the full LSP feature surface most tools have for mainstream languages.
Install
pip install systemrdl-lsp
# or
uv pip install systemrdl-lsp
The server speaks LSP over stdio. Editor integrations launch the
systemrdl-lsp CLI and pipe.
Use it from your editor
VSCode / VSCodium / Cursor / Theia
Install the SystemRDL Pro
extension (also on Open VSX).
The extension supervises this LSP for you — restart, crash recovery, the lot.
Neovim (nvim-lspconfig)
require'lspconfig.configs'.systemrdl_lsp = {
default_config = {
cmd = { 'systemrdl-lsp' },
filetypes = { 'systemrdl' },
root_dir = require'lspconfig.util'.root_pattern('peakrdl.toml', '.git'),
settings = {
['systemrdl-pro'] = {
includePaths = {}, -- list of dirs searched by `include
includeVars = {}, -- $VAR / ${VAR} substitution in include paths
},
},
},
}
require'lspconfig'.systemrdl_lsp.setup{}
Helix
Add to ~/.config/helix/languages.toml:
[language-server.systemrdl-lsp]
command = "systemrdl-lsp"
[[language]]
name = "systemrdl"
scope = "source.rdl"
file-types = ["rdl"]
language-servers = ["systemrdl-lsp"]
Emacs (eglot)
(add-to-list 'eglot-server-programs '(systemrdl-mode . ("systemrdl-lsp")))
Feature surface
Implemented and shipped in v0.15.0:
- Live diagnostics — 300 ms debounce, 10 s timeout fallback, last-good
cache, per-URI bucketing for
`included files (clear-on-resolve cycle). - Hover — instance address/width/access for regs, parameter values for
parametrized types,
bridgeflag for addrmaps,(← default at line N)annotation when a property comes from adefaultor dynamic assignment. - Goto-definition (F12 / Ctrl-click) — top-level types, instance names
(signals, registers), reference paths like
top.regfile.CTRL.enable(segment-by-segment), cross-file via`include. - Find references (Shift+F12) — every instantiation of a type, cross-file.
- Rename (F2) — workspace-wide, refuses on collision.
- Completion — ~85 keywords / properties / access values + user-defined
types + user-defined properties. Context-aware narrowing: after
sw =only access modes, afteraddressing =onlycompact / regalign / fullalign. - Document symbols / outline —
addrmap → regfile → reg → field. - Folding ranges, inlay hints (resolved absolute address ghost-grey
at end-of-line), CodeLens (
📊 N regs · 0xS..0xEsummary above everyaddrmap). - Workspace symbols (Ctrl+T) with optional pre-index for cross-file search.
- Type hierarchy — subtypes ≡ instances of the type.
- Document links on
`include "..."paths. - Document highlight, selection range, signature help inside
#(...). - Code action — quick-fix "Add
= 0reset value" on field declarations missing a reset. - Document formatting — conservative whitespace normaliser.
- Address conflict warnings — per-addrmap-scoped, skips reused-type bodies.
- Semantic tokens — distinguishes properties / values / types beyond TextMate scopes.
The custom rdl/elaboratedTree JSON-RPC method powers the memory-map viewer
in the VSCode extension and the standalone rdl-viewer CLI; the schema
lives at schemas/elaborated-tree.json.
Configuration
| Setting | Default | What |
|---|---|---|
systemrdl-pro.includePaths |
[] |
Directories searched by `include. Auto-discovered from peakrdl.toml; sibling-directory fallback. |
systemrdl-pro.includeVars |
{} |
$VAR / ${VAR} substitution in `include "..." paths. |
One-shot CLI
systemrdl-lsp also exposes a non-LSP one-shot for tooling:
python -m systemrdl_lsp.dump my-chip.rdl > tree.json
Emits the full elaborated tree (schema: schemas/elaborated-tree.json) on
stdout. Used by the standalone rdl-viewer CLI to drive the browser-served
viewer without an editor.
Compatibility
- Python: 3.10+
perlonPATH(optional) unlocks the SystemRDL Perl preprocessor (clause 16.3) for parametric register generation.
Source
github.com/seimei-d/systemrdl-pro (monorepo: LSP + viewer + VSCode extension).
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file systemrdl_lsp-0.21.1.tar.gz.
File metadata
- Download URL: systemrdl_lsp-0.21.1.tar.gz
- Upload date:
- Size: 129.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d523f4a3d7987851a12eb3986a60a3970286f581ff67afe0d66193f1c70fcb6
|
|
| MD5 |
e1d2ad8fbb61ac83fa7b1444bb1ede37
|
|
| BLAKE2b-256 |
8748ea57d6579f6dd91a3d393b520f7589436d85a749a3f80798823427391602
|
Provenance
The following attestation bundles were made for systemrdl_lsp-0.21.1.tar.gz:
Publisher:
lsp-publish.yml on seimei-d/systemrdl-pro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
systemrdl_lsp-0.21.1.tar.gz -
Subject digest:
8d523f4a3d7987851a12eb3986a60a3970286f581ff67afe0d66193f1c70fcb6 - Sigstore transparency entry: 1435869164
- Sigstore integration time:
-
Permalink:
seimei-d/systemrdl-pro@c8a999f2c8113861b2e33253b7c9549cc9569516 -
Branch / Tag:
refs/tags/lsp-v0.21.1 - Owner: https://github.com/seimei-d
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
lsp-publish.yml@c8a999f2c8113861b2e33253b7c9549cc9569516 -
Trigger Event:
push
-
Statement type:
File details
Details for the file systemrdl_lsp-0.21.1-py3-none-any.whl.
File metadata
- Download URL: systemrdl_lsp-0.21.1-py3-none-any.whl
- Upload date:
- Size: 110.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49979068225bc14ff74e446b217c1a0f38f77056a12cf4e46683845e4967277e
|
|
| MD5 |
6ece288885b43f08c2f0e4dddefdbb61
|
|
| BLAKE2b-256 |
d558d3cae3ef2cfed2f43a5b1a776614f1c8d1daefe58fe488573ec1557229c4
|
Provenance
The following attestation bundles were made for systemrdl_lsp-0.21.1-py3-none-any.whl:
Publisher:
lsp-publish.yml on seimei-d/systemrdl-pro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
systemrdl_lsp-0.21.1-py3-none-any.whl -
Subject digest:
49979068225bc14ff74e446b217c1a0f38f77056a12cf4e46683845e4967277e - Sigstore transparency entry: 1435869255
- Sigstore integration time:
-
Permalink:
seimei-d/systemrdl-pro@c8a999f2c8113861b2e33253b7c9549cc9569516 -
Branch / Tag:
refs/tags/lsp-v0.21.1 - Owner: https://github.com/seimei-d
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
lsp-publish.yml@c8a999f2c8113861b2e33253b7c9549cc9569516 -
Trigger Event:
push
-
Statement type: