2023-06-30 03:41:48 -03:00
|
|
|
return {
|
2024-05-18 14:39:20 +02:00
|
|
|
recommended = function()
|
|
|
|
return LazyVim.extras.wants({
|
|
|
|
ft = { "elixir", "eelixir", "heex", "surface" },
|
|
|
|
root = "mix.exs",
|
|
|
|
})
|
|
|
|
end,
|
2024-06-15 17:30:39 +10:00
|
|
|
{
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
opts = {
|
|
|
|
servers = {
|
|
|
|
elixirls = {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-06-30 03:41:48 -03:00
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
2024-06-07 09:03:59 +02:00
|
|
|
opts = { ensure_installed = { "elixir", "heex", "eex" } },
|
2023-06-30 03:41:48 -03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"nvim-neotest/neotest",
|
|
|
|
optional = true,
|
|
|
|
dependencies = {
|
|
|
|
"jfpedroza/neotest-elixir",
|
|
|
|
},
|
|
|
|
opts = {
|
|
|
|
adapters = {
|
|
|
|
["neotest-elixir"] = {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-10-01 14:48:09 -03:00
|
|
|
{
|
|
|
|
"nvimtools/none-ls.nvim",
|
|
|
|
optional = true,
|
|
|
|
opts = function(_, opts)
|
|
|
|
local nls = require("null-ls")
|
2023-10-10 22:12:33 +02:00
|
|
|
opts.sources = vim.list_extend(opts.sources or {}, {
|
2024-06-25 23:04:32 +04:00
|
|
|
nls.builtins.diagnostics.credo.with({
|
|
|
|
condition = function(utils)
|
|
|
|
return utils.root_has_file(".credo.exs")
|
|
|
|
end,
|
|
|
|
}),
|
2023-10-01 14:48:09 -03:00
|
|
|
})
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"mfussenegger/nvim-lint",
|
|
|
|
optional = true,
|
2023-10-06 09:18:04 +02:00
|
|
|
opts = function(_, opts)
|
|
|
|
opts.linters_by_ft = {
|
2023-10-01 14:48:09 -03:00
|
|
|
elixir = { "credo" },
|
2023-10-06 09:18:04 +02:00
|
|
|
}
|
2024-06-25 23:04:32 +04:00
|
|
|
|
|
|
|
opts.linters = {
|
|
|
|
credo = {
|
|
|
|
condition = function(ctx)
|
|
|
|
return vim.fs.find({ ".credo.exs" }, { path = ctx.filename, upward = true })[1]
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
}
|
2023-10-06 09:18:04 +02:00
|
|
|
end,
|
2023-10-01 14:48:09 -03:00
|
|
|
},
|
2023-06-30 03:41:48 -03:00
|
|
|
}
|