Skip to content

1.8.0

Choose a tag to compare

@UNLINEARITY UNLINEARITY released this 10 Feb 07:26
· 81 commits to main since this release

Code Space Release Notes - 1.8.0

Overview

This release adds several quality-of-life improvements: a master toggle for external folder mounts, more flexible new file locations, line range syntax for code embeds, automatic save on close, and important bug fixes for embed rendering and code outline behavior.

New Features

External folder mounts master toggle

  • Added a global "Enable external folder mounts" toggle in Settings.
  • When disabled, all mounted external folders are unmounted (configuration is preserved).
  • When re-enabled, all previously configured mounts are restored automatically.
  • The toggle hides the entire external mounts section when off for a cleaner UI.

New file location options

  • Added "Current file's folder" option for new code file location.
  • You can now choose where new code files are created:
    • Specified folder: Use a fixed folder path (classic behavior).
    • Current file's folder: Save to the same folder as the currently active note.
  • The path input and browse button are hidden when "current file's folder" is selected.

Line range syntax for code embeds

  • Code embeds now support line range syntax: ![[test.py#20-40]].
  • Supports multiple formats: #20-40, #L20-L40, #L20-40.
  • If the end line exceeds the file length, it automatically truncates to the end.
  • Range mode ignores the maxEmbedLines setting and shows the full requested range.
  • Single-line syntax still works: ![[test.py#20]] shows from line 20 to the end.

Automatic save on close

  • Added event-triggered auto-save to prevent data loss.
  • Code files are now automatically saved when:
    • Closing a Code Space tab
    • Closing the Obsidian window
    • Unloading the plugin
  • This complements the existing Ctrl+S manual save workflow.

Bug Fixes

Code embed rendering

  • Fixed code embeds not rendering in Reading mode by relaxing CSS selectors.
  • Code embeds now render correctly in both Live Preview and Reading modes.
  • Fixed code embeds not rendering in the main window (regression).

UI/UX Improvements

  • Simplified Settings by hiding the external mount configuration when the feature is disabled.
  • Better notification messages when bulk mounting/unmounting external folders.

新增外部文件夹挂载总开关和更灵活的新文件保存位置,代码嵌入支持精确的行号范围引用,关闭时自动保存有效防止数据丢失,同时修复了多个代码嵌入渲染相关问题,使整体使用更加流畅。

Full Changelog: 1.7.1...1.8.0