feature/obsidian custom suggestions#2932
feature/obsidian custom suggestions#2932stanley-910 wants to merge 9 commits intoAutomattic:masterfrom
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # packages/obsidian-plugin/src/lint.ts
…r custom suggestions
|
I love that you took initiative to build out this feature, but I would have preferred it to wrap our existing work with Weir. Is there a specific reason you chose this specific syntax? Could we achieve similar behavior by dynamically creating Weir rules? For context, here is the Weir documentation: https://writewithharper.com/docs/weir |
|
Oh I actually wasn't familiar with Weir; Taking a look over it now, it looks very promising, and apologies if it looked like I was stepping on its toes. There are a couple typos I make consistently that don't show up as suggested fixes w/ Harper's current suggestions, and since I mostly use it on the Obsidian side, I thought a feature where people could define custom suggestions to specific string values might be handy... if only as a temporary work around before Weir does get fully integrated. I mostly designed it around being compact and quickly changeable (formatted like So, while not a full Weir integration, I still think it could prove handy in the interim to users. |
Issues
Description
Add custom typo suggestions to the Obsidian plugin so users can define personal fixes like
adn: andand surface them directly in lint suggestions.This PR includes:
Custom Typo Suggestionssetting in Obsidian:-based typo mapping syntax (for exampleadn: and)Bugs found during implementation:
useWebWorkerto beundefinedand crash the settings tab. Fixed by adding a safe loading state and waiting for async settings/defaults/descriptions before rendering.Disabled/Enabledlinter churn and unstable reload behavior. Fixed by serializing settings updates and avoiding full editor-linter recreation on every settings edit.Demo
Screen.Recording.2026-03-14.at.7.31.50.PM.mov
How Has This Been Tested?
pnpm exec vitest run src/State.test.ts src/customSuggestions.test.ts src/lint.test.ts --browser.enabled=falsepnpm buildChecklist