This Visual Studio Code extension enhances development workflows by providing comprehensive support for Firebot variables. It includes features like auto-completions, diagnostic validations, and code snippets for Firebot variable usage.
- Trigger characters:
$
,[
,(
,{
,:
,;
, and space. - Supported file types: HTML, CSS, and JavaScript.
- Real-time validation for Firebot variable usage.
- Identifies issues such as:
- Invalid nested structures.
- Missing or mismatched brackets.
- Variables requiring default values.
- Invalid regex patterns.
- Invalid file paths or CSS context issues.
- Validate File: Run
firebot-vscode-variable-helper.validateFile
to validate the current file. - Insert Variable: Use
firebot-vscode-variable-helper.insertVariable
to quickly insert a Firebot variable with a snippet.
- Enhanced word pattern recognition for Firebot variables.
- Suppresses built-in CSS validation for better compatibility with Firebot-specific syntax.
- Provides quick access to the extension's features via a dedicated status bar item.
- Clone the repository:
git clone https://github.com/your-repo/firebot-vscode-extension.git
- Install dependencies:
npm install
- Compile the extension:
npm run compile
- Package into .vsix extension for VSCode:
node --trace-warnings node_modules/@vscode/vsce/vsce package
- From within VSCode go to the Extensions Panel (CTRL+SHIFT+X) click the three dots at the top and select "Install from VSIX...." and select it from where you compiled it
- Start typing a Firebot variable using
$
to trigger suggestions. - Variables without Arguments (e.g.,
$user
): type$user
in the editor. Trigger IntelliSense and accept the completion. - Variables with Required Arguments (e.g.,
$math
): type '$math' in the editor. Trigger IntelliSense and accept the completion fill out the Argument as needed. - Variables with Optional Arguments (e.g., '$unixTimestamp': type '$unixTimestamp' in the editor. Trigger IntelliSense with
TAB
accept the completion and the variable will be inserted with brackets, if you type or hitBACKSPACE
the brackets are skipped. If you pressTAB
again, it will allow you to input arguments inside the brackets.
- Automatically detects and highlights issues in supported file types.
- Use the command
Firebot Helper: Validate File
to manually trigger validation.
- Run the
Firebot Helper: Insert Variable
command from the Command Palette. - Choose a variable from the quick pick menu.
- Customize the snippet placeholders as needed.
- HTML
- CSS
- JavaScript
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Make changes and commit:
git commit -m "Add feature-name"
- Push changes and create a pull request.
Special thanks to the Firebot community for their support and contributions.
AI Disclaimer: Parts of this was made with vaious AI tools. Note: This extension assumes familiarity with Firebot and its variable syntax. For more details, refer to the (outdated) Firebot Variable Documentation.