elixir-tools / next-ls

The language server for Elixir that just works. Ready for early adopters!
https://www.elixir-tools.dev/next-ls
MIT License
691 stars 41 forks source link

Unnecessary (?) completions on "do|" #470

Closed teamon closed 4 months ago

teamon commented 4 months ago
image

It seems that do| triggers completions and when hitting enter it will insert defoverridable instead of going to the next line. Since do is a keyword I think it should skip completions (ideally go to the next line and insert end if needed)

teamon commented 4 months ago

This is what ElixirLS shows:

image

and hitting enter will move the cursor to the next line and insert the missing end

mhanberg commented 4 months ago

You hit d with triggers the completions, then then the editor fuzzy filters them down to show what's in the screenshot.

Is this zed? I'm not sure why it would auto select the first option, I imagine that has other consequences.

Orthogonally, can probably add do as a completion candidate.

teamon commented 4 months ago

This one is from vscode. ElixirLS seems to prioritize do as a reserved keyword and selects it as the first option.

Can I can test something else or get some logs to see why this happens?

mhanberg commented 4 months ago

To clarify, what are you wanting to test? Why VScode is selecting the completion item?

teamon commented 4 months ago

Well just anything I can do to help :)

mhanberg commented 4 months ago

Gotcha, well I'll clarify:

mhanberg commented 4 months ago

image

Changing the second option is probably what you want.

teamon commented 4 months ago

I've checked with Zed and there completions are shown on d, then hidden on do and then shown again on do<any other character>.

Thanks for all the help, I'm going to close this for now.