feat(elixir): add elixirls code actions (#4148)

This is a refactoring of #3846  with the changes:

- Use `Lazyvim.lsp.execute` on keymaps to make everything simpler;
- Remove expandMacro. 

Closes #3846

---------

Co-authored-by: Ahmed Kamal <ahmed@moon-i.com.au>
This commit is contained in:
George Guimarães 2024-07-22 15:11:30 -07:00 committed by GitHub
parent 1c2be200c1
commit f94a0591b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,32 @@ return {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
opts = { opts = {
servers = { servers = {
elixirls = {}, elixirls = {
keys = {
{
"<leader>cp",
function()
local params = vim.lsp.util.make_position_params()
LazyVim.lsp.execute({
command = "manipulatePipes:serverid",
arguments = { "toPipe", params.textDocument.uri, params.position.line, params.position.character },
})
end,
desc = "To Pipe",
},
{
"<leader>cP",
function()
local params = vim.lsp.util.make_position_params()
LazyVim.lsp.execute({
command = "manipulatePipes:serverid",
arguments = { "fromPipe", params.textDocument.uri, params.position.line, params.position.character },
})
end,
desc = "From Pipe",
},
},
},
}, },
}, },
}, },