Open weizheheng opened 2 years ago
This gets close, I'm still having some weirdness with erblint writing random configs to disk with this setup, still looking into that.
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
local erblint = {
lintCommand = "erblint --format compact --stdin ${INPUT}",
lintStdin = true,
lintFormats = {
"%f:%l:%c: %m",
},
lintIgnoreExitCode = true,
formatCommand = "erblint --autocorrect --stdin ${INPUT} | tail -n +5",
formatStdin = true,
}
lspconfig.efm.setup {
capabilities = capabilities,
init_options = { documentFormatting = true },
settings = {
rootMarkers = {".git/"},
languages = {
eruby = {erblint},
}
},
filetypes = {
"eruby",
}
}
Name: erb-lint URL: https://github.com/Shopify/erb-lint
There is this issue open on the Ale's repository. I am curious is this possible to add this here?
I was trying around and thought I might be able to change the lintingCommand and formatCommand to get it work. But I am not really sure what that two commands are expecting. Would love some input on whether this integration is possible.