diff options
author | Christian Chiarulli <[email protected]> | 2021-07-24 21:17:11 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-24 21:17:11 -0400 |
commit | 98f8a77819670ce6012216e01885c135a6d3a289 (patch) | |
tree | b655da889c33e0eb89251878783700a8cd014a27 /lua/lang/elixir.lua | |
parent | 0884dcd84670bc097c34253e983d2cde9c209dfa (diff) |
New contract (#1080)
Changes to the global config object
O is now lvim
user_plugins is now plugins
user_autocommands is now autocommands
No more lang specific plugins
Null-ls has replaced both formatter.nvim and nvim-lint
Diffstat (limited to 'lua/lang/elixir.lua')
-rw-r--r-- | lua/lang/elixir.lua | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/lua/lang/elixir.lua b/lua/lang/elixir.lua deleted file mode 100644 index e702e89b..00000000 --- a/lua/lang/elixir.lua +++ /dev/null @@ -1,61 +0,0 @@ -local M = {} - -M.config = function() - O.lang.elixir = { - formatter = { - exe = "mix", - args = { "format" }, - stdin = true, - }, - lsp = { - path = DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh", - }, - } -end - -M.format = function() - O.formatters.filetype["elixir"] = { - function() - return { - exe = O.lang.elixir.formatter.exe, - args = O.lang.elixir.formatter.args, - stdin = O.lang.elixir.formatter.stdin, - } - end, - } - - require("formatter.config").set_defaults { - logging = false, - filetype = O.formatters.filetype, - } -end - -M.lint = function() - -- TODO: implement linters (if applicable) - return "No linters configured!" -end - -M.lsp = function() - if require("lv-utils").check_lsp_client_active "elixirls" then - return - end - - require("lspconfig").elixirls.setup { - cmd = { O.lang.elixir.lsp.path }, - on_attach = require("lsp").common_on_attach, - } -end - -M.dap = function() - -- TODO: implement dap - return "No DAP configured!" -end - --- needed for the LSP to recognize elixir files (alternativly just use elixir-editors/vim-elixir) --- vim.cmd [[ --- au BufRead,BufNewFile *.ex,*.exs set filetype=elixir --- au BufRead,BufNewFile *.eex,*.leex,*.sface set filetype=eelixir --- au BufRead,BufNewFile mix.lock set filetype=elixir --- ]] - -return M |