I’ve got elixir-mode and eglot configured in my emacs.d and it mostly works. One thing I can’t figure out though is how to work with the code completion (via company) in elixir code.
Say I type defm at this point I get the completion options pop up. I select defmodule and then it expands to
defmodule $1 do
$0
end
But the cursor (point) moves to the end of end. I get no opportunity to specify the module name and also complete the module body.
When I disable eglot and use only elixir-mode I get the expected behaviour were selecting defmodule from the completion list places the cursor (point) between defmodule and do where I type the module name then another tab places the cursor inside the module body.
What is the way to work with what seems to be eglot’s way of code completion?
@Pilgrim I couldn’t reproduce this bug. Running latest eglot in elpa, and elixir-lsp/elixir-ls (more updated fork at the moment). When I hit enter on defmodule completion, works as expected: cursor at module name, and tab goes to module body.
I wonder if you have a company issue, or with another package.
I run into same issue with my Emacs setup, and I was able to solve it.
Based on the github issue I was able to deduce that Eglot upon start communicates to Language Server that he supports snippets, and I would guess, that based on this start-up info it will either try to pass it into snippet engine or not. You could look into your *EGLOT (....) events* buffer; find first message ( with M-<), and verify your settings.