No description
Find a file
Amato21 4a8275ffa7
Add alias support to the mention suggester
Add alias support to the mention suggester
2026-07-21 19:55:29 +02:00
.github/workflows Replace tag-push release workflow with a release-published one 2026-07-18 14:57:31 +00:00
tests Add alias support to the mention suggester 2026-07-21 17:55:16 +00:00
.gitignore Commit built main.js so the plugin is usable without a local build 2026-07-18 14:51:07 +00:00
CHANGELOG.md Add alias support to the mention suggester 2026-07-21 17:55:16 +00:00
CLAUDE.md Reconcile version at 0.2.2, stop bumping ahead of releases 2026-07-19 17:58:49 +00:00
esbuild.config.mjs Address Obsidian plugin review bot warnings 2026-07-18 15:14:32 +00:00
LICENSE Add MIT license 2026-07-18 14:45:20 +00:00
main.js Add alias support to the mention suggester 2026-07-21 17:55:16 +00:00
main.ts Add alias support to the mention suggester 2026-07-21 17:55:16 +00:00
manifest.json Reconcile version at 0.2.2, stop bumping ahead of releases 2026-07-19 17:58:49 +00:00
package-lock.json Address Obsidian plugin review bot warnings 2026-07-18 15:14:32 +00:00
package.json Reconcile version at 0.2.2, stop bumping ahead of releases 2026-07-19 17:58:49 +00:00
README.md Add alias support to the mention suggester 2026-07-21 17:55:16 +00:00
styles.css Add MVP scaffold for Lightweight Mentions Obsidian plugin 2026-07-18 13:59:30 +00:00
tsconfig.json Add MVP scaffold for Lightweight Mentions Obsidian plugin 2026-07-18 13:59:30 +00:00
versions.json Reconcile version at 0.2.2, stop bumping ahead of releases 2026-07-19 17:58:49 +00:00

Lightweight Mentions

An Obsidian plugin for people who mention way more things than they want to turn into full notes.

Type a trigger character (@ by default) followed by a name:

  • If a real note matches, it links straight to it.
  • If nothing matches yet, it appends a heading to a single shared stub file (Mentions.md by default) and links to that heading instead of forcing you to create — and later manage — a whole new note.
  • Whenever a stub deserves to become a real note, run Promote mention to full note: it extracts the heading into a new file (optionally picking a template from a folder of them) and rewrites every existing link across the vault to point at the new note instead of the old heading.

How to Install

Manually

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Copy them into <vault>/.obsidian/plugins/lightweight-mentions/.
  3. Reload Obsidian and enable Lightweight Mentions in Settings → Community plugins.

Via BRAT (beta builds)

  1. Install BRAT from the Community Plugins store.
  2. Add a Beta Plugin with this URL: https://github.com/Amato21/Lightweight-Mentions

This plugin isn't on the official Community Plugins list yet.


Usage

Mentioning something

Type @ (configurable) followed by a name and pick a suggestion:

  • An existing note → inserts [[Note]].
  • An existing note matched by one of its frontmatter aliases (alias or aliases, single string, comma-separated, or a YAML list) → inserts [[Note|Alias]].
  • An existing stub heading → inserts [[Mentions#Heading]].
  • Nothing found → Create "..." appends ## Name to the stub file and inserts [[Mentions#Name]].

Commands (Ctrl/Cmd + P)

  • Promote mention to full note — run with the cursor either on a [[Mentions#Heading]] link anywhere in the vault, or inside that heading's section in the stub file itself. It:

    1. If a template folder is configured and has at least one file in it, asks which template to apply (or none, via Esc).
    2. Creates a new note from the heading's content, through that template if one was picked.
    3. Removes the heading from the stub file.
    4. Rewrites every [[Mentions#Heading]] link across the vault to point at the new note.

    Templater note: this plugin doesn't call Templater itself — it just writes the chosen template's raw text into the new note (with {{title}}/{{content}} substituted first). In practice, Templater syntax in that text still gets executed: if Templater's "Trigger Templater on new file creation" setting is enabled, Templater watches for any newly created file (regardless of which plugin created it or whether it started empty) and processes any Templater syntax already present in its content.

Configuration

Go to Settings → Lightweight Mentions:

  • Trigger character — what you type to open the mention suggester (default @).
  • Stub file — vault path of the shared file storing lightweight mentions as headings (default Mentions.md).
  • Promoted notes folder — where new notes land when a mention is promoted (defaults to the stub file's own folder).
  • Template folder — optional folder of templates; promoting a mention asks which one (if any) to apply, with {{title}} and {{content}} placeholders.

Data access

To power the mention suggester, this plugin reads the list of every markdown file in your vault (file names, not their content) plus the headings of the stub file, on every keystroke while the suggester is open. It never reads any other file's content, and nothing ever leaves your vault — no network requests are made.


Plugin review notes

Findings from the Obsidian plugin review, and how each was addressed:

Finding Status
Release name must include the manifest.json version Fixed — release titles now include the version (e.g. "0.2.1 — ...").
Unawaited promise (main.ts, command callback) Fixed — wrapped with void.
Unsafe any assignment (loadData() into typed settings) Fixed — result is cast to Partial<LightweightMentionsSettings> | null before merging.
EditorSuggest.selectSuggestion returned Promise<void> instead of void Fixed — split into a sync void method that fires a private async helper.
builtin-modules package flagged for replacement Fixed — swapped for Node's own module.builtinModules.
Vault enumeration (vault.getMarkdownFiles, etc.) Documented, not changed — see "Data access" above; required for the mention suggester to work.

Known limitations

  • One global stub file — no per-topic/per-folder stub files yet.
  • Heading matching for promotion is by exact text + heading level, so renaming a stub heading by hand before promoting can break the link rewrite.

Changelog

See CHANGELOG.md for the full version history.

Development

npm install
npm run dev    # watch build
npm run build  # production build (main.js)