return { recommended = function() return LazyVim.extras.wants({ ft = { "elixir", "eelixir", "heex", "surface", "livebook" }, root = "mix.exs", }) end, { "neovim/nvim-lspconfig", opts = { servers = { elixirls = { keys = { { "cp", function() local params = vim.lsp.util.make_position_params() LazyVim.lsp.execute({ command = "manipulatePipes:serverid", arguments = { "toPipe", params.textDocument.uri, params.position.line, params.position.character }, }) end, desc = "To Pipe", }, { "cP", function() local params = vim.lsp.util.make_position_params() LazyVim.lsp.execute({ command = "manipulatePipes:serverid", arguments = { "fromPipe", params.textDocument.uri, params.position.line, params.position.character }, }) end, desc = "From Pipe", }, }, }, }, }, }, { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} vim.list_extend(opts.ensure_installed, { "elixir", "heex", "eex" }) vim.treesitter.language.register("markdown", "livebook") end, }, { "nvim-neotest/neotest", optional = true, dependencies = { "jfpedroza/neotest-elixir", }, opts = { adapters = { ["neotest-elixir"] = {}, }, }, }, { "nvimtools/none-ls.nvim", optional = true, opts = function(_, opts) local nls = require("null-ls") opts.sources = vim.list_extend(opts.sources or {}, { nls.builtins.diagnostics.credo.with({ condition = function(utils) return utils.root_has_file(".credo.exs") end, }), }) end, }, { "mfussenegger/nvim-lint", optional = true, opts = function(_, opts) opts.linters_by_ft = { elixir = { "credo" }, } opts.linters = { credo = { condition = function(ctx) return vim.fs.find({ ".credo.exs" }, { path = ctx.filename, upward = true })[1] end, }, } end, }, { "MeanderingProgrammer/render-markdown.nvim", optional = true, ft = function(_, ft) vim.list_extend(ft, { "livebook" }) end, }, }