Update markdown linting commands and documentation
Renamed commands for enabling and disabling markdown linting to `MarkdownLintEnable` and `MarkdownLintDisable`. Updated the README to reflect these changes and added a note about markdown linting being disabled by default.
This commit is contained in:
parent
7a98fa5b5c
commit
a06e931c6a
|
|
@ -69,8 +69,10 @@ rm Session.vim # Won't auto-create a new one
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `:LintMarkdownEnable` | Enable automatic markdown linting (runs on BufEnter, BufWritePost, InsertLeave) |
|
| `:MarkdownLintEnable` | Enable automatic markdown linting (runs on BufEnter, BufWritePost, InsertLeave) |
|
||||||
| `:LintMarkdownDisable` | Disable automatic markdown linting and clear diagnostics |
|
| `:MarkdownLintDisable` | Disable automatic markdown linting and clear diagnostics |
|
||||||
|
|
||||||
|
**Note:** Markdown linting is disabled by default. Spellcheck is always enabled for markdown files.
|
||||||
|
|
||||||
## `lua/plugins/gitsigns.lua` *(buffer-local when inside a git repo)*
|
## `lua/plugins/gitsigns.lua` *(buffer-local when inside a git repo)*
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ return {
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Commands to enable/disable automatic markdown linting
|
-- Commands to enable/disable automatic markdown linting
|
||||||
vim.api.nvim_create_user_command("LintMarkdownEnable", function()
|
vim.api.nvim_create_user_command("MarkdownLintEnable", function()
|
||||||
lint.linters_by_ft.markdown = { "markdownlint" }
|
lint.linters_by_ft.markdown = { "markdownlint" }
|
||||||
vim.notify("Markdown linting enabled (automatic)", vim.log.levels.INFO)
|
vim.notify("Markdown linting enabled (automatic)", vim.log.levels.INFO)
|
||||||
-- Lint immediately
|
-- Lint immediately
|
||||||
|
|
@ -89,7 +89,7 @@ return {
|
||||||
end
|
end
|
||||||
end, { desc = "Enable automatic markdown linting" })
|
end, { desc = "Enable automatic markdown linting" })
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("LintMarkdownDisable", function()
|
vim.api.nvim_create_user_command("MarkdownLintDisable", function()
|
||||||
lint.linters_by_ft.markdown = nil
|
lint.linters_by_ft.markdown = nil
|
||||||
vim.notify("Markdown linting disabled", vim.log.levels.INFO)
|
vim.notify("Markdown linting disabled", vim.log.levels.INFO)
|
||||||
-- Clear existing diagnostics for markdown buffers
|
-- Clear existing diagnostics for markdown buffers
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue