PyBlade IntelliSense provides tools like syntax highlighting, code snippets, and validation to enhance development with PyBlade templates across editors and IDEs.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Welcome to the PyBlade VS Code Extension, the ultimate tool to supercharge your experience with the PyBlade template engine for Python! This extension is designed to provide a seamless, developer-friendly workflow for creating dynamic, secure, and expressive templates in Django or other Python web frameworks.
Features
1. IntelliSense for PyBlade Directives
Auto-Completion: Get real-time suggestions for PyBlade directives like @if, @for, @csrf, and more.
Context-Aware Suggestions: IntelliSense adapts to your code context, ensuring relevant suggestions for logic, loops, and conditions.
Custom Directives: Automatically detects custom directives defined in your project.
2. Syntax Highlighting
Beautiful and precise syntax highlighting for all PyBlade-specific syntax.
Supports nested directives and complex expressions, making your code more readable.
3. Snippets for Rapid Development
Quick access to commonly used directives and structures:
@ifelse blocks
@for loops
@component declarations
Editable snippet templates to suit your project’s needs.
4. Error Highlighting
Real-time error detection for unclosed directives or invalid syntax.
Inline error messages to ensure your templates work flawlessly.
5. Live Preview Integration
Instantly preview your rendered templates in the browser (requires a configured Python project).
Automatic reload on file changes for faster iteration.
6. Code Navigation
Quickly jump to the definitions of components, directives, and included templates.
Hover tooltips display useful documentation and examples.
7. Customizable Configuration
Full control over the extension’s behavior, such as:
Toggling specific features (e.g., live preview, error highlighting).
Customizing themes for syntax highlighting.
Getting Started
Enable PyBlade in Your Project:
Ensure your project is configured to use PyBlade.
Start Writing Templates:
Open any .html file and enjoy IntelliSense, syntax highlighting, and snippets.
Customize the Extension:
Use the PyBlade section in the VS Code settings to adjust preferences.
Keybindings
Insert Directive Snippet: Ctrl+Space (or Cmd+Space) inside a PyBlade template.
Jump to Component: Ctrl+Click (or Cmd+Click) on a component name.
Live Preview: Ctrl+Shift+P → Search for "PyBlade: Preview Template".
Future Enhancements
We are continually improving the PyBlade VS Code Extension! Planned updates include:
Advanced Debugging Tools for templates.
Framework-Specific Enhancements for Flask and others.
Community-Suggested Features—share your ideas with us!
Contributing
We welcome contributions to enhance the PyBlade VS Code Extension! Feel free to: