local null_ls = require("null-ls") local formatting = null_ls.builtins.formatting local sources = { formatting.eslint, formatting.autopep8, formatting.stylua, formatting.clang_format, -- formatting.prettier, -- formatting.latexindent, } null_ls.setup({ sources = sources, on_attach = function(client) if client.server_capabilities.document_formatting then vim.cmd("autocmd BufWritePre lua vim.lsp.buf.formatting()") end end, })