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)
|
2023-10-06 09:18:04 +02:00
|
|
|
if vim.fn.executable("credo") == 0 then
|
|
|
|
return
|
|
|
|
end
|
2023-10-01 14:48:09 -03:00
|
|
|
local nls = require("null-ls")
|
2023-10-10 22:12:33 +02:00
|
|
|
opts.sources = vim.list_extend(opts.sources or {}, {
|
2023-10-01 14:48:09 -03:00
|
|
|
nls.builtins.diagnostics.credo,
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"mfussenegger/nvim-lint",
|
|
|
|
optional = true,
|
2023-10-06 09:18:04 +02:00
|
|
|
opts = function(_, opts)
|
|
|
|
if vim.fn.executable("credo") == 0 then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
opts.linters_by_ft = {
|
2023-10-01 14:48:09 -03:00
|
|
|
elixir = { "credo" },
|
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
|
|
|
}
|