added default elixir formatter (#934)

This commit is contained in:
Tiberiu Craciun 2021-07-14 18:06:07 +03:00 committed by GitHub
parent 1a26b973d1
commit 623c2e62b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 1 deletions

View file

@ -2,6 +2,21 @@ if require("lv-utils").check_lsp_client_active "elixirls" then
return
end
O.formatters.filetype["elixir"] = {
function()
return {
exe = O.lang.elixir.formatter.exe,
args = O.lang.elixir.formatter.args,
stdin = not (O.lang.elixir.formatter.stdin ~= nil),
}
end,
}
require("formatter.config").set_defaults {
logging = false,
filetype = O.formatters.filetype,
}
require("lspconfig").elixirls.setup {
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" },
}

View file

@ -123,7 +123,13 @@ O = {
efm = {},
elm = {},
emmet = { active = false },
elixir = {},
elixir = {
formatter = {
exe = "mix",
args = { "format" },
stdin = true,
},
},
graphql = {},
go = {
formatter = {