mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-05 02:24:58 +02:00
added default elixir formatter (#934)
This commit is contained in:
parent
1a26b973d1
commit
623c2e62b5
2 changed files with 22 additions and 1 deletions
|
@ -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" },
|
||||
}
|
||||
|
|
|
@ -123,7 +123,13 @@ O = {
|
|||
efm = {},
|
||||
elm = {},
|
||||
emmet = { active = false },
|
||||
elixir = {},
|
||||
elixir = {
|
||||
formatter = {
|
||||
exe = "mix",
|
||||
args = { "format" },
|
||||
stdin = true,
|
||||
},
|
||||
},
|
||||
graphql = {},
|
||||
go = {
|
||||
formatter = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue