@@ -166,6 +166,15 @@ return { -- LSP Plugins
166166 })
167167 end
168168
169+ -- Elixir-specific keymaps, but they only work with elixir-tools installed
170+ -- TODO: Figure out how to run these commands in the LSP itself, without needing the elixir-tools
171+ local elixirDesc = ' LSP Elixir: '
172+ if client and client .name == ' elixirls' then
173+ vim .keymap .set (' n' , ' <space>fp' , ' :ElixirFromPipe<cr>' , { desc = elixirDesc .. ' [f]rom [p]ipe' , buffer = true , noremap = true })
174+ vim .keymap .set (' n' , ' <space>tp' , ' :ElixirToPipe<cr>' , { desc = elixirDesc .. ' [t]o [p]ipe' , buffer = true , noremap = true })
175+ vim .keymap .set (' v' , ' <space>em' , ' :ElixirExpandMacro<cr>' , { desc = elixirDesc .. ' [e]xpand [m]acro' , buffer = true , noremap = true })
176+ end
177+
169178 -- The following code creates a keymap to toggle inlay hints in your
170179 -- code, if the language server you are using supports them
171180 --
@@ -299,4 +308,14 @@ return { -- LSP Plugins
299308 vim .keymap .set ({ ' n' , ' v' }, ' <leader>xe' , require (' nvim-emmet' ).wrap_with_abbreviation )
300309 end ,
301310 },
311+ {
312+ ' elixir-tools/elixir-tools.nvim' ,
313+ dependencies = {
314+ ' nvim-lua/plenary.nvim' ,
315+ },
316+ event = { ' BufReadPre' , ' BufNewFile' },
317+ config = function ()
318+ require (' elixir' ).setup ()
319+ end ,
320+ },
302321}
0 commit comments