diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index a3e3401..7c8cb03 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -4,6 +4,35 @@ return { dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, opts = {}, }, + { + "elixir-tools/elixir-tools.nvim", + version = "*", + event = { "BufReadPre", "BufNewFile" }, + config = function() + local elixir = require("elixir") + local elixirls = require("elixir.elixirls") + + elixir.setup({ + nextls = { enable = true }, + credo = {}, + elixirls = { + enable = true, + settings = elixirls.settings({ + dialyzerEnabled = false, + enableTestLenses = false, + }), + on_attach = function(client, bufnr) + vim.keymap.set("n", "fp", ":ElixirFromPipe", { buffer = true, noremap = true }) + vim.keymap.set("n", "tp", ":ElixirToPipe", { buffer = true, noremap = true }) + vim.keymap.set("v", "em", ":ElixirExpandMacro", { buffer = true, noremap = true }) + end, + }, + }) + end, + dependencies = { + "nvim-lua/plenary.nvim", + }, + }, { "neovim/nvim-lspconfig", opts = {