Add option to run linting only on save

#5 · closed · 0 comments

View on GitHub ↗

madskristensen

## Feature Request Add an option to run linting **only on save** instead of continuously as you type. ### Problem Some users may find real-time linting distracting or may experience performance issues on very large documents. They would prefer to see violations only after saving. ### Proposed Solution Add a `run` setting with two options: - **`onType`** (default) - Lint continuously as you edit - **`onSave`** - Lint only when the document is saved ### Example Configuration ``` Tools → Options → Markdown Lint → General Run: [dropdown: On Type / On Save] ``` ### Behavior Details When set to **On Save**: - No squiggly underlines appear while editing - Error List remains empty/stale until save - Upon save, full analysis runs and violations appear - Quick fixes still work after save (on displayed violations) ### Implementation Notes - Would need to hook into document save events (`IVsRunningDocTableEvents3.OnAfterSave` or `ITextDocument.FileActionOccurred`) - The tagger would need to check this setting before triggering analysis - Consider showing a status indicator that linting is pending ### Reference The VS Code markdownlint extension implements this as `markdownlint.run`: - [VS Code markdownlint run documentation](https://github.com/DavidAnson/vscode-markdownlint#markdownlintrun)

Comments