[nvim] Suppress diagnostics on Markdown file load
This commit is contained in:
parent
d4d29da748
commit
fb296a84cc
1 changed files with 6 additions and 0 deletions
|
@ -6,3 +6,9 @@
|
||||||
--
|
--
|
||||||
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
|
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
|
||||||
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
|
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
|
callback = function(args)
|
||||||
|
vim.diagnostic.enable(vim.bo[args.buf].filetype ~= "markdown" and true or false)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue