Skip to content

VS Code / Cursor extension

The mussolene.1c-hbk-bsl extension adds complete BSL support to VS Code and Cursor. Platform-specific VSIX packages already include the server, so a separate Python or Toolkit installation is normally unnecessary.

Install from VS Marketplace Download a VSIX

Requirements and first run

  1. Use VS Code or Cursor with VS Code API 1.85+.
  2. Install the extension.
  3. Open a folder containing .bsl or .os files.
  4. Wait for the server to start; findings appear in Problems.

Separate builds are published for macOS Apple Silicon, macOS Intel, Linux x64, and Windows x64.

Features

Area Features
Code syntax highlighting and semantic tokens
Diagnostics 180 rules, Problems, and quick fixes
Formatting document, range, and on-type indentation
Navigation definition, references, workspace symbols, and call hierarchy
Assistance hover, completion, signature help, and inlay hints
Refactoring rename and code actions
{
  "[bsl]": {
    "editor.defaultFormatter": "mussolene.1c-hbk-bsl",
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.tabSize": 4,
    "editor.insertSpaces": false
  }
}

Extension settings

Key Purpose
onecHbkBsl.serverPath Explicit onec-hbk-bsl path; normally keep the default
onecHbkBsl.indexDbPath Custom SQLite index path
onecHbkBsl.indexMode project, off, symbols, or full
onecHbkBsl.indexMaxBytes Index size limit; -1 reads project configuration
onecHbkBsl.logLevel debug, info, warning, or error
onecHbkBsl.diagnostics.enabled Enables diagnostics while editing
onecHbkBsl.diagnostics.select Runs only the listed rules
onecHbkBsl.diagnostics.ignore Excludes the listed rules
onecHbkBsl.useDocker Starts LSP in an existing Docker container
onecHbkBsl.dockerContainer Docker container name

Rule codes and compatible aliases are listed in the diagnostic catalog. Keep project analysis settings in onec-hbk-bsl.toml and server/editor startup settings in VS Code Settings.

After changing the server path or diagnostic settings, run Developer: Reload Window.

Commands

The Command Palette provides:

  • 1C HBK BSL: Reindex Workspace;
  • 1C HBK BSL: Reindex Current File;
  • 1C HBK BSL: Show Index Status;
  • 1C HBK BSL: Show Server Log.

Server resolution

The extension checks these sources in order:

  1. explicit onecHbkBsl.serverPath;
  2. the binary bundled in the VSIX;
  3. onec-hbk-bsl from PATH;
  4. a previously downloaded binary in extension storage;
  5. a matching binary from a GitHub Release.

A normal installation uses the binary bundled in the VSIX.

Troubleshooting

  • Open 1C HBK BSL: Show Server Log.
  • Confirm that the workspace contains .bsl or .os files.
  • Check onec-hbk-bsl.toml, diagnostics.select, and diagnostics.ignore.
  • Run 1C HBK BSL: Reindex Workspace after large project changes.
  • Set an absolute onecHbkBsl.serverPath when using a custom server.