Bluespec Language Server.
- Uses bsc for linting.
- Uses tree-sitter for Completion on
.,{and(character - Includes
bsv_format, an opinionated code formatter (like Black for Python)
Installation
pip install bsv-language-server
The language server searches upwards from the current folder for for a .bscflags file for setting to use for compilation The tree-sitter parser is not complete, it currently parses most typedef enum/struct, interfaces module instantation and assignment statements and fails on everything else. This subset should be enough for type completion.
How to use
In your project hierarchy create a file .bscflags with compile time options e.g. .bscflags
-p /prj/bsvlib/bdir:bo:+
-bdir bo
-info-dir bo
Formatter
bsv_format is an opinionated formatter installed alongside the language server. It rewrites BSV source files in-place with consistent style — no configuration needed.
Rules
- 3-space indentation, derived from block structure (
module/endmodule,rule/endrule,interface/endinterface,begin/end, etc.) - Spaces around operators:
x<-foo→x <- foo,x<=y→x <= y - Space after control keywords:
if(→if (,for(→for ( - Struct literal spacing:
Foo_st{→Foo_st { - Continuation indent: multi-line parameter lists and
provisos(...)clauses get one extra indent level; closing)aligns with the opener line - Preprocessor blocks:
`ifdef/`ifndef/`else/`elsif/`endifare indented as code blocks - Blank lines: at most one consecutive blank line preserved
- Trailing whitespace removed; file always ends with a single newline
end*:labelsuffixes (endmodule:foo,endpackage:bar) handled correctly
Usage
Format one or more files in-place:
bsv_format MyModule.bsv
bsv_format src/*.bsv
Check whether files need formatting without modifying them (exits non-zero if any file would change):
bsv_format --check MyModule.bsv
The formatter is also invoked automatically by the language server when the editor requests document formatting (e.g. "Format Document" in VS Code, gq via vim-lsp).
VIM
In your .vimrc Add the following plugins e.g. using Vundle
Plugin 'prabirshrestha/vim-lsp'
Plugin 'prabirshrestha/asyncomplete.vim'
Plugin 'prabirshrestha/asyncomplete-lsp.vim'
".... other vundle stuff
if executable('bsv_language_server')
au User lsp_setup call lsp#register_server({
\ 'name': 'bsv_language_server',
\ 'cmd': {server_info->['bsv_language_server']},
\ 'allowlist': ['bsv'],
\ 'workspace_config': {
\ 'bluespec': {
\ 'compilerFlags': ['-p', '+:/prj/bsvlib/bdir:bo', '-check']
\ }
\ }
\ })
endif
Send PR's for other editors.
Metadata
Release files for bsv-language-server 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bsv_language_server-0.1.1.tar.gz | 4.8 MB | With provenance | Details for bsv_language_server-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bsv_language_server-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for bsv_language_server-0.1.1-py3-none-any.whl |
Total release size: 4.8 MB
Release files / bsv_language_server-0.1.1.tar.gz
| Download URL | bsv_language_server-0.1.1.tar.gz |
|---|---|
| Size | 4.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5982e7ac16a2bd80f7753b42cd2a955cf4878d1d2ba4917a076ebf63fc227944
|
|
BLAKE2b-256 checksum How to use checksums |
7c227465cc2d73dbfe0c3fb90904b2ed51261ad692f9491734b9bc4848140b40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 12, 2026.
Transparency logRelease files / bsv_language_server-0.1.1-py3-none-any.whl
| Download URL | bsv_language_server-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc1239e63259d65e9fa5c1ca343c8b018b15a8473a0fc7c10cc96ca396ee0b88
|
|
BLAKE2b-256 checksum How to use checksums |
ae97d1496be36f664abef1a213309ed790d3f3a90027b62792277801d52e686f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 12, 2026.
Transparency logSecurity for bsv-language-server 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for bsv_language_server-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.