2022-07-14 18:51:47 -04:00
|
|
|
local null_ls = require("null-ls")
|
|
|
|
|
|
|
|
|
|
null_ls.setup({
|
2022-11-30 17:21:29 -05:00
|
|
|
--[[ on_attach = function(client, bufnr)
|
2022-07-14 18:51:47 -04:00
|
|
|
if client.resolved_capabilities.document_formatting then
|
|
|
|
|
vim.cmd("nnoremap <silent><buffer> <Leader>f :lua vim.lsp.buf.formatting()<CR>")
|
|
|
|
|
-- format on save
|
|
|
|
|
vim.cmd("autocmd BufWritePost <buffer> lua vim.lsp.buf.formatting()")
|
|
|
|
|
end
|
|
|
|
|
if client.resolved_capabilities.document_range_formatting then
|
|
|
|
|
vim.cmd("xnoremap <silent><buffer> <Leader>f :lua vim.lsp.buf.range_formatting({})<CR>")
|
2022-11-30 17:21:29 -05:00
|
|
|
end
|
|
|
|
|
end,--]]
|
|
|
|
|
sources = {
|
|
|
|
|
null_ls.builtins.completion.spell,
|
|
|
|
|
null_ls.builtins.diagnostics.codespell,
|
2022-12-22 18:15:25 -05:00
|
|
|
null_ls.builtins.diagnostics.markdownlint.with({ extra_args = { "--disable", "MD013", "MD024", "--" }
|
2022-12-07 14:09:19 -05:00
|
|
|
,}),
|
|
|
|
|
null_ls.builtins.diagnostics.pycodestyle.with({ extra_args = { "--max-line-length=150" }}),
|
2022-11-30 17:21:29 -05:00
|
|
|
null_ls.builtins.formatting.black.with({ extra_args = { "--fast" }}),
|
|
|
|
|
},
|
2022-07-14 18:51:47 -04:00
|
|
|
})
|