From fd5194cf78d7dd21269a20ff31f0af5190747954 Mon Sep 17 00:00:00 2001 From: connorgmeean Date: Sun, 20 Mar 2022 19:18:00 +1100 Subject: [PATCH] feat(modules): Added markdown language module. --- lua/doom/modules/langs/markdown/init.lua | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 lua/doom/modules/langs/markdown/init.lua diff --git a/lua/doom/modules/langs/markdown/init.lua b/lua/doom/modules/langs/markdown/init.lua new file mode 100644 index 0000000..4de0b8b --- /dev/null +++ b/lua/doom/modules/langs/markdown/init.lua @@ -0,0 +1,32 @@ +local markdown = {} + +markdown.settings = { +} + +markdown.autocmds = { + { + "FileType", + "markdown", + function() + local langs_utils = require("doom.modules.langs.utils") + + langs_utils.use_lsp("remark_ls") + + vim.defer_fn(function() + require("nvim-treesitter.install").ensure_installed("markdown") + end, 0) + + -- Setup null-ls + if doom.modules.linter then + local null_ls = require("null-ls") + + langs_utils.use_null_ls_source({ + null_ls.builtins.diagnostics.markdownlint, + }) + end + end, + once = true, + }, +} + +return markdown