From 4aed78a5b3103fd5810f6916124ecfb87862047d Mon Sep 17 00:00:00 2001 From: Devin Haska <2636402+wonderfulfrog@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:43:21 -0700 Subject: [PATCH] feat: add markdown linting/formatting --- lua/plugins/formatting.lua | 1 + lua/plugins/linting.lua | 16 ++++++++++++++-- lua/plugins/lsp.lua | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lua/plugins/formatting.lua b/lua/plugins/formatting.lua index d3ca74e..ee276c1 100644 --- a/lua/plugins/formatting.lua +++ b/lua/plugins/formatting.lua @@ -6,6 +6,7 @@ return { scss = { "prettierd" }, html = { "djlint" }, lua = { "stylelua" }, + markdown = { "prettierd" }, javascript = { "prettierd" }, javascriptreact = { "prettierd" }, json = { "prettierd" }, diff --git a/lua/plugins/linting.lua b/lua/plugins/linting.lua index 660ea46..66ce712 100644 --- a/lua/plugins/linting.lua +++ b/lua/plugins/linting.lua @@ -1,4 +1,4 @@ -return { +return { { "mfussenegger/nvim-lint", opts = { events = { "BufWritePost", "BufReadPost", "InsertLeave" }, @@ -23,4 +23,16 @@ return { end, }) end, -} +}, { + "jose-elias-alvarez/null-ls.nvim", + event = { "BufWritePost", "BufReadPost", "InsertLeave" }, + opts = function() + local null_ls = require("null-ls") + local diagnostics = null_ls.builtins.diagnostics + return { + sources = { + diagnostics.vale, + } + } + end +} } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 860226c..c8a3210 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -22,6 +22,7 @@ return { "eslint_d", "prettierd", "stylua", + "vale", }, automatic_installation = true, }