neovim-confs/lua/lazyvim/plugins/extras/lang/elixir.lua

58 lines
1.1 KiB
Lua
Raw Normal View History

2024-01-11 11:44:26 +01:00
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"elixir",
"heex",
"eex",
})
end,
},
{
"williamboman/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"elixir-ls",
})
end,
},
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
"jfpedroza/neotest-elixir",
},
opts = {
adapters = {
["neotest-elixir"] = {},
},
},
},
{
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
if vim.fn.executable("credo") == 0 then
return
end
local nls = require("null-ls")
opts.sources = vim.list_extend(opts.sources or {}, {
nls.builtins.diagnostics.credo,
})
end,
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = function(_, opts)
if vim.fn.executable("credo") == 0 then
return
end
opts.linters_by_ft = {
elixir = { "credo" },
}
end,
},
}