Skip to content

feat: add ignore folders on file creation setting#1710

Open
C-Bjorn wants to merge 3 commits intoSilentVoid13:masterfrom
C-Bjorn:feature/ignore-folders-on-creation
Open

feat: add ignore folders on file creation setting#1710
C-Bjorn wants to merge 3 commits intoSilentVoid13:masterfrom
C-Bjorn:feature/ignore-folders-on-creation

Conversation

@C-Bjorn
Copy link
Copy Markdown

@C-Bjorn C-Bjorn commented Mar 28, 2026

Summary

Adds a new setting under Trigger Templater on new file creation that lets users specify folders where Templater's file creation handler should be skipped entirely.

Files created inside these folders (and all subfolders) will not trigger the on_file_creation handler, preventing Templater syntax from being inadvertently stripped by other plugins or automation workflows.

Changes

  • src/settings/Settings.ts

    • New IgnoreFolderOnCreation interface
    • Added ignore_folders_on_creation to DEFAULT_SETTINGS and Settings interface
    • New add_ignore_folders_on_creation_setting() method shown first in the trigger section, above Folder templates and File regex templates
    • Supports add / move up / move down / delete, with FolderSuggest autocomplete
  • src/core/Templater.ts

    • Early-return guard added in on_file_creation() before delay(300), using normalizePath + startsWith

Testing

Tested locally in Obsidian:

  • Ignored folder setting appears and saves correctly
  • Files created in ignored folders are NOT processed by Templater
  • Files created outside ignored folders continue to work normally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant