vsg-bridge-ls/showcase
Dandaedre aa2763d739
Provide LSP document formatting
2026-10-03 01:35:21 +02:00
..
README.md Provide LSP document formatting 2026-10-03 01:35:21 +02:00
demo_design.vhd Clarify formatter severity behavior 2026-10-03 01:15:03 +02:00
one-line-entity.vhd Add VSG correction actions 2026-10-03 00:44:40 +02:00
vsg.yaml Clarify formatter severity behavior 2026-10-03 01:15:03 +02:00

README.md

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", "showcase/vsg.yaml"]

[[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:

  1. See full-line diagnostics with exact VSG rule IDs.
  2. Hover the line for severity, phase, fixability, effective configuration, and documentation links.
  3. select an individual Quick Fix for one rule on line 1;
  4. select Fix all VSG findings to run the normal phase-seven formatter; and
  5. run Helix :format through 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 and does not replace the individual fixes.

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.