add elixir tools

This commit is contained in:
Youwen Wu 2024-05-12 15:19:50 -07:00
parent 4fe4edd6db
commit 7f1a07c7ca
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -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", "<space>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
end,
},
})
end,
dependencies = {
"nvim-lua/plenary.nvim",
},
},
{
"neovim/nvim-lspconfig",
opts = {