Skip to content

2.4.5 - Smart Indentation, .editorconfig Support, Modern YAML Syntax & Bug Fixes (Please give a star and follow)

Choose a tag to compare

@soulripper13 soulripper13 released this 09 Apr 09:16
a401d2b

Smart Indentation, .editorconfig Support, Modern YAML Syntax & Bug Fixes

What's New

Professional Indentation Engine

We’ve overhauled how Blueprint Studio handles whitespace to bring it closer to a full IDE experience:

  • .editorconfig Support: The editor now automatically detects and applies indent_style and indent_size rules from .editorconfig files. It follows the standard "walk up" logic (stopping at root = true) and caches results for a snappy experience.
  • Smart Backspace: Pressing Backspace in leading whitespace now deletes back to the previous indent stop (e.g., removing 2 spaces at once) instead of one character at a time.
  • Improved Auto-Detection: The algorithm for detecting a file's indentation is now much smarter, ignoring single-occurrence deltas (like YAML block scalars) to prevent the "Spaces 1" error.
  • Per-File Settings: Opening a file with unique indentation no longer overwrites your global preferences. The editor now respects the file's specific needs without changing your default settings.

Enhanced Autocomplete

  • Modern Trigger Syntax: Autocomplete now prioritizes the modern trigger: state form (introduced in HA 2024.4), while keeping legacy platform variants as secondary options.
  • New Types: Added support for persistent_notification triggers and trigger condition types.
  • Smarter Context: The YAML analyzer now scans up to 15 lines (previously 5) to detect blueprints, ensuring it isn't tripped up by long header comments.
  • Toggle Control: A new setting in Settings → Editor → Behavior allows you to disable autocomplete suggestions if you prefer a manual workflow.

Bug Fixes & Improvements

Editor & UI

  • Status Bar Sync: Changing indentation via the status bar picker now correctly updates the Settings panel (and vice versa).
  • File Tree Stability: Fixed a critical bug where collapsing a folder in navigation mode would cause the entire file tree to disappear.
  • Tab-Indent Logic: Fixed an issue where "Indent with Tabs" was incorrectly calculating units, ensuring that tabbing adds exactly one tab character.
  • Visibility Fix: Switching browser tabs or windows no longer "stomps" over a file's detected indentation with global preferences.

Reliability & Performance

  • Settings Persistence: Added a timestamp-based syncing system (_savedAt). If you reload the page before a server save completes, the latest local changes will automatically re-sync to the server on reload.
  • Autocomplete Precision: Fixed a bug in service completion where leading whitespace after a colon caused fragments of old text to remain.
  • Silenced 404s: Optimized the .editorconfig fetcher to stop logging 404 errors to the console when a config file isn't present.
  • Code Stability: Fixed a SyntaxError crash caused by a missing async declaration in the tab activation logic.