reddit / emacs

Can someone help me understand what's happening with these autocompletions?

whalenutten · 2022-12-15 19:23
whalenutten · 2022-12-15 19:25
I'm using lsp-mode with elixir, I'm guessing that this might have something to do with yasnippets, but honestly I have no idea and I'm not really sure what I should google either. And to clarify I want to either have my cursor placed at the dollarsigns, which I'm guessing is the intended behavior or just not get the template at all and only autocomplete to `defmodule`.
DefiantAverage1 · 2022-12-15 19:33
To get your cursor placed on the dollar signs, press tab right after selecting a snippet. To only complete defmodule, see if you can disable yasnippets
whalenutten · 2022-12-15 19:56
I have no fake internet points to spend on you, but thanks a ton! I hadn't enabled yas-global-mode which seems to be the cause for this behavior.
seaborgiumaggghhh · 2022-12-15 20:46
Yeah this same thing happened to me a while back. Glad it’s sorted
gerlacdt · 2022-12-15 21:35
You have to enable yasnippet globally or for elixir mode. Then it will make sense. https://github.com/joaotavora/yasnippet#use-yas-minor-mode-on-a-per-buffer-basis Another option ist to disable snippet support in lsp mode.