local null_ls = require("null-ls") null_ls.setup({ debug = false, -- set to true if you want log spam sources = { null_ls.builtins.formatting.prettier.with({ filetypes = { "markdown", "markdown.pandoc", "pandoc" }, }), }, on_attach = function(client, bufnr) if client.supports_method("textDocument/formatting") then vim.api.nvim_create_autocmd("BufWritePre", { buffer = bufnr, callback = function() vim.lsp.buf.format({ bufnr = bufnr }) end, }) end end, })