From 841695e30c5fa6ade20e7ea8d547d2d9c5404f29 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Sat, 3 Oct 2026 02:12:19 +0200 Subject: [PATCH] Rename the installed bridge executable --- Cargo.lock | 2 +- Cargo.toml | 2 +- Jenkinsfile | 12 ++++++------ README.md | 21 +++++++++++++-------- doc/editor-configuration.md | 27 +++++++++++++++++---------- doc/installation.md | 4 ++-- showcase/README.md | 8 ++++++-- src/lib.rs | 6 +++--- 8 files changed, 49 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index abf7ef2..2ee4fe8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -930,7 +930,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] -name = "vsg_bridge_ls" +name = "vsg-bridge-ls" version = "0.2.0" dependencies = [ "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 2d85780..a35058f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "vsg_bridge_ls" +name = "vsg-bridge-ls" description = "A very featureless VSG to lsp bridge" version = "0.2.0" edition = "2021" diff --git a/Jenkinsfile b/Jenkinsfile index fa5ed08..05a8031 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -215,36 +215,36 @@ pipeline { publishChecks( conclusion: 'SUCCESS', name: 'Rust CI', - summary: 'vsg_bridge_ls passed CI.', + summary: 'vsg-bridge-ls passed CI.', text: 'Dependency audit/policy, MSRV/stable checks, formatting, tests, Clippy, and coverage completed successfully.', title: 'Build Successful' ) - echo '✅ vsg_bridge_ls passed CI.' + echo '✅ vsg-bridge-ls passed CI.' } failure { publishChecks( conclusion: 'FAILURE', name: 'Rust CI', - summary: 'vsg_bridge_ls failed CI.', + summary: 'vsg-bridge-ls failed CI.', text: 'A dependency audit/policy, MSRV/stable, formatting, test, Clippy, or coverage check failed. Check the Jenkins log.', title: 'Build Failed' ) - echo '❌ vsg_bridge_ls CI failed.' + echo '❌ vsg-bridge-ls CI failed.' } unstable { publishChecks( conclusion: 'ACTION_REQUIRED', name: 'Rust CI', - summary: 'vsg_bridge_ls CI is unstable.', + summary: 'vsg-bridge-ls CI is unstable.', text: 'The Jenkins build completed with an unstable status.', title: 'Build Unstable' ) - echo '⚠️ vsg_bridge_ls CI is unstable.' + echo '⚠️ vsg-bridge-ls CI is unstable.' } cleanup { diff --git a/README.md b/README.md index 93e54ef..64b7c5b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# vsg_bridge_ls +# vsg-bridge-ls ![version](https://assets.dandaedre.com/coverage/MadGobblins/vsg-bridge-ls/main/version.svg) ![tests](https://assets.dandaedre.com/coverage/MadGobblins/vsg-bridge-ls/main/test.svg) ![test coverage](https://assets.dandaedre.com/coverage/MadGobblins/vsg-bridge-ls/main/coverage.svg) -`vsg_bridge_ls` reports [VSG](https://github.com/jeremiah-c-leary/vhdl-style-guide) +`vsg-bridge-ls` reports [VSG](https://github.com/jeremiah-c-leary/vhdl-style-guide) diagnostics through the Language Server Protocol (LSP). A complete setup needs the companion VSG fork and this bridge. @@ -49,8 +49,8 @@ Activate the environment and verify both executables: ```sh . .venv/bin/activate command -v vsg -command -v vsg_bridge_ls -vsg_bridge_ls --version +command -v vsg-bridge-ls +vsg-bridge-ls --version ``` The version includes both the Cargo release and build commit, for example @@ -62,7 +62,12 @@ Add this minimal setup to `~/.config/helix/languages.toml`: ```toml [language-server.vsg_bridge_ls] -command = "vsg_bridge_ls" +command = "vsg-bridge-ls" +args = [ + "--configuration", "/absolute/path/to/vsg-bridge-ls/showcase/vsg.yaml", + # Uncomment the next line to enable the experimental grouped line fix. + # "--experimental-multi-rule-line-fix", +] [[language]] name = "vhdl" @@ -96,9 +101,9 @@ to request that action. For deliberately unformatted files and expected interactions, see the [LSP showcase](showcase/README.md). -An additional multi-rule action is available behind -`--experimental-multi-rule-line-fix`. It is disabled by default because VSG -phases can move later findings to different lines. See the +The commented argument above enables an additional multi-rule action. It is +disabled by default because VSG phases can move later findings to different +lines. See the [experimental action safety notes](doc/experimental-multi-rule-line-fix.md) before enabling it. diff --git a/doc/editor-configuration.md b/doc/editor-configuration.md index 622dba6..79c494d 100644 --- a/doc/editor-configuration.md +++ b/doc/editor-configuration.md @@ -16,7 +16,12 @@ Add this configuration to `~/.config/helix/languages.toml`: ```toml [language-server.vsg_bridge_ls] -command = "vsg_bridge_ls" +command = "vsg-bridge-ls" +args = [ + "--configuration", "/absolute/path/to/vsg-bridge-ls/showcase/vsg.yaml", + # Uncomment the next line to enable the experimental grouped line fix. + # "--experimental-multi-rule-line-fix", +] [[language]] name = "vhdl" @@ -24,17 +29,19 @@ language-servers = ["vsg_bridge_ls"] auto-format = false ``` -To use VSG configuration files, add arguments to the server entry. Repeat +To use another VSG configuration, change the path in the argument list. Repeat `-c PATH` for multiple files; relative paths are resolved from the project: ```toml args = ["-c", "vhdl/config.yaml"] ``` -The experimental grouped same-line action additionally requires -`--experimental-multi-rule-line-fix` in this argument list. It is deliberately -off by default; read its [safety notes](experimental-multi-rule-line-fix.md) -before enabling it. +The experimental grouped same-line action is enabled by uncommenting its entry +in the complete example. It is deliberately off by default; read its +[safety notes](experimental-multi-rule-line-fix.md) before enabling it. +Keep every option and value as a separate quoted array item with a trailing +comma. An absolute configuration path avoids dependence on Helix's project +working directory. If another VHDL server is installed, it can run alongside the bridge: @@ -66,17 +73,17 @@ Plug 'prabirshrestha/vim-lsp' Then register the bridge in `.vimrc`: ```vim -if executable('vsg_bridge_ls') +if executable('vsg-bridge-ls') au User lsp_setup call lsp#register_server({ \ 'name': 'vsg_bridge_ls', - \ 'cmd': {server_info->['vsg_bridge_ls']}, + \ 'cmd': {server_info->['vsg-bridge-ls']}, \ 'allowlist': ['vhdl'], \ }) endif ``` Start Vim from the activated `.venv`. To pass a VSG configuration file, change -the command to `['vsg_bridge_ls', '-c', 'vhdl/config.yaml']`. +the command to `['vsg-bridge-ls', '-c', 'vhdl/config.yaml']`. The bridge advertises standard LSP document formatting. Its standard code actions and formatting should appear through vim-lsp's corresponding commands. @@ -104,7 +111,7 @@ Create `.vscode/lsp-proxy.json` in the VHDL project: [ { "languageId": "vhdl", - "command": "vsg_bridge_ls", + "command": "vsg-bridge-ls", "transport": "stdio", "fileExtensions": [".vhd", ".vhdl"] } diff --git a/doc/installation.md b/doc/installation.md index 907301b..defbce0 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -1,6 +1,6 @@ # Installation -`vsg_bridge_ls` starts `vsg` by name, so both executables must be available in +`vsg-bridge-ls` starts `vsg` by name, so both executables must be available in the environment used by the editor. Formatting additionally requires the companion fork's `--stdout` and `--no-failure` options; upstream VSG alone is not sufficient for that workflow. @@ -80,7 +80,7 @@ Check the same environment the editor will inherit: ```sh command -v vsg -command -v vsg_bridge_ls +command -v vsg-bridge-ls ``` Python 3.8 is the fork's minimum supported version. The complete test suite and diff --git a/showcase/README.md b/showcase/README.md index df35827..3e10982 100644 --- a/showcase/README.md +++ b/showcase/README.md @@ -9,8 +9,12 @@ pass the showcase configuration to the bridge: ```toml [language-server.vsg_bridge_ls] -command = "vsg_bridge_ls" -args = ["--configuration", "showcase/vsg.yaml"] +command = "vsg-bridge-ls" +args = [ + "--configuration", "/absolute/path/to/vsg-bridge-ls/showcase/vsg.yaml", + # Uncomment the next line to enable the experimental grouped line fix. + # "--experimental-multi-rule-line-fix", +] [[language]] name = "vhdl" diff --git a/src/lib.rs b/src/lib.rs index db1b94c..804a495 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -128,7 +128,7 @@ mod tests { #[test] fn builds_vsg_configuration_arguments() { let options = Options::try_parse_from([ - "vsg_bridge_ls", + "vsg-bridge-ls", "-c", "first.yaml", "--configuration", @@ -145,7 +145,7 @@ mod tests { /// No configuration option produces an empty VSG argument vector. #[test] fn accepts_no_configuration_files() { - let options = Options::try_parse_from(["vsg_bridge_ls"]) + let options = Options::try_parse_from(["vsg-bridge-ls"]) .expect("options without configuration files are valid"); assert!(options.vsg_arguments().is_empty()); @@ -167,7 +167,7 @@ mod tests { #[test] fn parses_experimental_multi_rule_line_flag() { let options = - Options::try_parse_from(["vsg_bridge_ls", "--experimental-multi-rule-line-fix"]) + Options::try_parse_from(["vsg-bridge-ls", "--experimental-multi-rule-line-fix"]) .expect("experimental flag is valid"); assert!(options.experimental_multi_rule_line_fix);