reddit / emacs

lsp-mode Completions with Yasnippet for Elixir Doesn't Insert Parameters

blah1998z · 2022-11-05 01:51
​ [My Emacs running LSP and not getting parameters upon choosing a function](https://reddit.com/link/ymgza1/video/xdnjwbujb1y91/player) Technically, I have two questions but the one in the title is far more important to me. So my understanding is that LSP/Company can be made to insert the parameters of a function so that the parameter names are already filled out for you; while from the no-longer-supported `company-lsp`, the below Gif demonstrates the relative idea: [Company Mode inserting the parameters of the function chosen](https://i.redd.it/vtyvfi70d1y91.gif) But, as you can see from the end of my video, my Emacs doesn't insert those parameters, just giving me an empty set of parentheses. My setup isn't terribly complicated, sticking to general defaults: (add-hook 'elixir-mode-hook (lambda () (require 'lsp-mode) (lsp) (require 'yasnippet) (yas-minor-mode-on) (flymake-elixir-load) (setq indent-tabs-mode nil))) (defvar lsp-elixir--config-options (make-hash-table)) (add-hook 'lsp-after-initialize-hook (lambda () (lsp--set-configuration `(:elixirLS, lsp-elixir--config-options)))) (setq lsp-clients-elixir-server-executable '("~/elixir-ls/release/erl25/language_server.sh")) `lsp-completion-enable` is already set to `t`. Would anyone know why this might be the case? I may have to open an issue with `lsp-mode`. *Possibly* specifically due to Elixir but, as it doesn't have its own mode (unlike, say, `lsp-java`), I sort of expected it should be just configured by `lsp-mode`. ​ Another question (though far less important to me) is that Company seems to be using `company-minimum-prefix-length` for not only initial typing but, also, after hitting a period. Like I would expect, typing a period gives me a list of completing options but, then, I start to type and the list goes away until I've put three characters. I could be mistaken but I thought that Company forewent `company-minimum-prefix-length` in cases where one of the `company-auto-complete-chars` was what triggerred the completion list; having to type 3 characters to be able to see the list again, in that context, is disruptive. Anyway to forego that behavior?
coolstuff39 · 2022-11-05 11:47
Some servers do not support snippets. Have you checked if this server have support for them?
blah1998z · 2022-11-05 21:52
Mmm; I had been wondering this but hadn't seemed to pull up anything via any search engine regarding it. How does one check that, for a particular server?