2.5 KiB
LSP showcase
These deliberately unformatted, valid VHDL files make the bridge behavior easy to inspect in an editor. Do not format and commit them: their findings are the showcase.
From the repository root, start your editor with the VSG environment active and pass the showcase configuration to the bridge:
[language-server.vsg_bridge_ls]
command = "vsg-bridge-ls"
args = [
"--configuration", "/absolute/path/to/vsg-bridge-ls/showcase/vsg.yaml",
# Uncomment to allow an action that opens rule documentation in a browser.
# "--allow-browser-action",
# Uncomment the next line to enable experimental individual rule fixes.
# "--experimental-rule-fix",
# Uncomment the next line to enable the experimental grouped line fix.
# "--experimental-multi-rule-line-fix",
# Uncomment the next line to expose debug information in hover and an action.
# "--debug-mode",
]
[[language]]
name = "vhdl"
language-servers = ["vsg_bridge_ls"]
auto-format = false
Open one-line-entity.vhd first. It intentionally has multiple fixable rules
on one line and rules from different VSG phases. You should be able to:
- See full-line diagnostics with exact VSG rule IDs.
- Hover the line for severity, phase, fixability, effective configuration, and documentation links.
- with
--experimental-rule-fix, select an individual Quick Fix for one rule on line 1; - select
Fix all VSG findingsto run the normal phase-seven formatter; and - run Helix
:formatthrough the bridge's equivalent LSP formatting request.
To inspect the opt-in grouped action, add
--experimental-multi-rule-line-fix to the bridge arguments. The action is
clearly labelled Experimental. Enable both correction flags to display grouped
and individual actions together.
Then open demo_design.vhd to inspect findings and fixes across an entity,
port clause, architecture, operators, indentation, and identifier casing. The
enabled comment_012 rule reports its TODO comment as a non-fixable Warning,
so both LSP Error and Warning presentation can be inspected. VSG deliberately
fixes only Error-severity rules; the warning remains after Fix all VSG findings, while one-line-entity.vhd becomes clean.
Restarting the language server should replace the existing diagnostic set, without doubling its entries. The bridge clears every open document during a graceful LSP shutdown so Helix can discard diagnostics owned by the old server instance.
Helix is the maintained test target. Its action picker is available through
space then a; hover is space then k. Key bindings can vary by release.