From b042623adf7daf3ccd4a54fcafcc90033e29a459 Mon Sep 17 00:00:00 2001 From: Hendra Date: Sat, 27 Apr 2024 22:12:47 +0700 Subject: [PATCH] Install elixir tools --- init.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/init.lua b/init.lua index 0ac637ef..b13e5feb 100644 --- a/init.lua +++ b/init.lua @@ -795,6 +795,35 @@ require('lazy').setup({ require('copilot_cmp').setup() end, }, + { + "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", "fp", ":ElixirFromPipe", { buffer = true, noremap = true }) + vim.keymap.set("n", "tp", ":ElixirToPipe", { buffer = true, noremap = true }) + vim.keymap.set("v", "em", ":ElixirExpandMacro", { buffer = true, noremap = true }) + end, + } + } + end, + dependencies = { + "nvim-lua/plenary.nvim", + }, + }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and