From fb296a84cca1098a98427c076c1f3db72f3c7c20 Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Thu, 19 Jun 2025 12:46:34 -0400 Subject: [PATCH] [nvim] Suppress diagnostics on Markdown file load --- nvim/lua/config/autocmds.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nvim/lua/config/autocmds.lua b/nvim/lua/config/autocmds.lua index 4221e75..305aacb 100644 --- a/nvim/lua/config/autocmds.lua +++ b/nvim/lua/config/autocmds.lua @@ -6,3 +6,9 @@ -- -- 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") + +vim.api.nvim_create_autocmd("BufEnter", { + callback = function(args) + vim.diagnostic.enable(vim.bo[args.buf].filetype ~= "markdown" and true or false) + end, +})