This Obsidian plugin formats and styles your notes with a focus on configurability and extensibility. Rules can be toggled and configured in the settings.
To lint the current file, run Lint the current file
(Ctrl+Alt+L
by default).
To lint all files, run Lint all files in the vault
.
To lint all files in the current folder run Lint all files in the current folder
. This action includes all subfolders.
You can also lint a folder by right clicking on it in the folder list and selecting "Lint folder" from the options.
When Lint on save
is toggled on, the plugin will lint the current file on manual save (when you press Ctrl+S
).
---
disabled rules: [capitalize-headings]
---
Add disabled rules: [ ... ]
to the YAML frontmatter of a file to disable those rules when linting that file.
Add disabled rules: [ all ]
to the YAML frontmatter of a file to disable all rules.
Documentation for all rules can be found in the rules docs. The docs are updated before the plugin is released, so may not be completely accurate.
Each rule is its own set of logic and is designed to be run independently. This means that enabling certain rules together could cause undesired results. One such case would be using "Paragraph blank lines" with "Two Spaces Between Lines with Content". These two rules have some overlap in what they target to change which results in undesired or unexpected results since together they work differently than if they were run by themselves.
- escape-yaml-special-characters
- format-tags-in-yaml
- format-yaml-array
- insert-yaml-attributes
- remove-yaml-keys
- yaml-key-sort
- yaml-timestamp
- yaml-title
- yaml-title-alias
- convert-bullet-list-markers
- emphasis-style
- no-bare-urls
- proper-ellipsis
- remove-consecutive-list-markers
- remove-empty-list-markers
- remove-hyphenated-line-breaks
- remove-multiple-spaces
- strong-style
- two-spaces-between-lines-with-content
- compact-yaml
- consecutive-blank-lines
- convert-spaces-to-tabs
- empty-line-around-code-fences
- empty-line-around-tables
- heading-blank-lines
- line-break-at-document-end
- paragraph-blank-lines
- remove-empty-lines-between-list-markers-and-checklists
- remove-link-spacing
- remove-space-around-fullwidth-characters
- space-after-list-markers
- space-between-chinese-and-english-or-numbers
- trailing-spaces
As of version 0.9.7 of Obsidian, this plugin is available to be installed directly from within the app. The plugin can be found in the Community Plugins directory which can be accessed from the Settings pane under Third Party Plugins.
- Download the latest release
- Extract the obsidian-linter folder from the zip to your vault's plugins folder:
<vault>/.obsidian/plugins/
Note: On some machines the.obsidian
folder may be hidden. On MacOS you should be able to pressCommand+Shift+Dot
to show the folder in Finder. - Reload Obsidian
- If prompted about Safe Mode, you can disable safe mode and enable the plugin.
Contributions are welcome, especially for new rules. If this is something you would like to do, take a look at the contribution guidelines.