Skip to content

feat(notes): support multiple comma-separated file extensions - #152

Merged
ItsLemmy merged 5 commits into
noctalia-dev:mainfrom
davidykmisha2015-prog:feature/multi-extension-notes
Nov 12, 2026
Merged

ItsLemmy merged 5 commits into
noctalia-dev:mainfrom
davidykmisha2015-prog:feature/multi-extension-notes

Conversation

@davidykmisha2015-prog

@davidykmisha2015-prog davidykmisha2015-prog commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Allow the extension setting in the Notes plugin to accept multiple comma-separated file extensions (e.g. md, txt, org, todo, markdown).

  • Parses comma-separated extensions in both panel.luau and launcher.luau (/nt).
  • Notes across all configured extensions are indexed and displayed in the panel list and launcher search.
  • When creating a new note via + or /nt, the first configured extension is used as the default.
  • When renaming an existing note, its current extension is preserved.
  • Updated the setting description in translations/en.json.

Motivation

Allow using the Notes plugin with notes directories containing multiple plain-text formats (such as Obsidian vaults or directories with .md, .txt, and .org files) without being restricted to only one format.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Build / packaging

Related Issue

None

Testing

  • Ran noctalia plugins lint notes: 0 errors, 0 warnings.
  • Ran python .github/workflows/validate-plugins.py: 14 manifests validated.
  • Configured extension = "md, txt, org, todo" and tested on Umbriel:
    • Notes with .md, .txt, .org, and .todo appear in the panel and launcher list.
    • Non-matching files (e.g. .pdf) are excluded.
    • Existing notes can be opened, edited, and autosaved.
    • Creating a new note creates a .md note.
    • Renaming preserves the original file extension.

Manual Coverage

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor: Umbriel
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors

Screenshots / Videos

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • I self-reviewed the changes.
  • I added or updated translations/en.json, or this PR adds no new user-facing strings.
  • I did not edit non-English translation files unless this PR is explicitly for translation tooling, an import/export sync, or a maintainer-requested locale change.

Additional Notes

Backwards-compatible: existing single-extension configs (e.g. "md") continue working without changes.

@davidykmisha2015-prog
davidykmisha2015-prog force-pushed the feature/multi-extension-notes branch from 6256e68 to 44b092d Compare November 10, 2026 19:14
@ItsLemmy

Copy link
Copy Markdown
Member

Thanks for the PR, fixed a few things on the branch. there are two minor nits left.

  1. nit - notes/panel.luau:48
    When the same name exists with two configured extensions (for example foo.md and foo.txt), both show as "foo" in the panel list and in the /nt results (notes/launcher.luau:46). The user can't tell them apart. Each row's key is the full filename, so opening the right file still works. One option is to show the extension for files that don't use the default suffix. That also affects how the rename field is seeded.

  2. nit - notes/panel.luau:61
    The scratchpad is always SCRATCHPAD_BASE .. defaultSuffix. If the user reorders the list (for example "md, txt" to "txt, md"), the old scratchpad.md still matches a configured suffix. It then appears as an ordinary note called "scratchpad" next to the pinned Scratchpad entry (notes/panel.luau:102, notes/launcher.luau:178). Before this PR, changing the extension hid the old scratchpad instead. It's a minor edge case.

@ItsLemmy
ItsLemmy merged commit 809e5c5 into noctalia-dev:main Nov 12, 2026
@davidykmisha2015-prog
davidykmisha2015-prog deleted the feature/multi-extension-notes branch November 13, 2026 09:01
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.

2 participants