VS Code extension
Autocomplete, hovers, snippets and diagnostics for bootstrap-ng in Angular templates, in Visual Studio Code and other editors that use Open VSX.
Install
Install the extension from either marketplace:
- VS Code Marketplace
- Open VSX Registry for Cursor, VSCodium, Windsurf and other compatible editors
Or install it from the command line:
code --install-extension coliff.bootstrap-ngFeatures
The extension works in HTML templates and in inline Angular template strings. Commands, settings, diagnostics and hovers follow the VS Code display language (English and Japanese).
- Completions for
bs*directives, their inputs and outputs, and documented values such astheme. - Completions and hovers for Bootstrap 6 classes in
classattributes, including responsive variants such asmd:col-6. - Completions for bootstrap-ng imports.
- Hovers with a short description and a link to these docs.
- Snippets for common components and form controls, such as
bs-alert,bs-dialogandbs-form-field. - Warnings for attribute values outside the documented set, with quick fixes that correct misspelled values.
- Hints on Bootstrap 5
data-bs-toggleanddata-bs-dismissattributes that name the bootstrap-ng directive to use instead, with quick fixes for tooltips, popovers and close buttons. - Warnings when a standalone component's template uses a directive it doesn't import, with a quick fix that adds the import.
- A Bootstrap-ng: Open Documentation command that opens the docs for the symbol under the cursor.
Settings
All diagnostics are on by default. Turn them off in your VS Code settings:
| Setting | Description |
|---|---|
bootstrap-ng.validateAttributeValues | Warns about unknown static attribute values. |
bootstrap-ng.hintBootstrap5DataApi | Hints about Bootstrap 5 data-bs-* attributes. |
bootstrap-ng.validateImports | Warns when a template uses a directive that its component doesn't import. |
To add missing imports to inline templates when you save, add this to your settings:
{
"editor.codeActionsOnSave": {
"source.fixAll.bootstrap-ng": "explicit"
}
}Source code
The extension is open source. Report issues and contribute on GitHub.