I keep getting ^M character when format using null-ls prettier
null-ls config:
local null_ls_status_ok, null_ls = pcall(require, “null-ls”)
if not null_ls_status_ok then
return
end
local formatting = null_ls.builtins.formatting
null_ls.setup({
debug = false,
sources = {
formatting.prettier.with({
extra_args = {
“–arrow-parens=avoid”,
“–single-quote=false”,
“–jsx-single-quote=false”,
“–tab-width=4”,
},
}),
formatting.black.with({ extra_args = { “–fast” } }),
formatting.stylua,
},
on_attach = function(client)
if client.resolved_capabilities.document_formatting then
vim.cmd("autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()")
end
end,
})
How do I get rid of it? tks a lot