Open titaniumbones opened 2 years ago
Do you have yasnippet installed and enabled? In general completion snippets work when they are provided by the server. Also, you can group yasnippet company backend with lsp-mode's one and you will get client-side snippets
hmm. I'm sorry to be a little dense. Is there a reference backed that I should test out to be sure the issue isn't with my javascript server? Here's what I've tried just now:
in my main emacs, execute lsp-plain
. In the new emacs, execute the following in scratch:
(package-install 'yasnippet-snippets)
(require 'company-yasnippet)
(setq company-backends '((company-capf company-yasnippet)))
(setq lsp-completion-provider :capf) ; ;I'm not sure if this is still recommende
in a pristine directory, create a new file test.js
and register the workspace with .
in the buffer, type function
.
I am not seeing a snippet option in the company popup.
Does it seem like I'm doing something wrong here?
If you want to do it like this you can change that to setq-local and use lsp-managed-mode-hook.
(setq company-backends '((company-capf company-yasnippet)))
Is your feature related or already mentioned on the wishlist?
I couldn't find it.
Describe your feature here.
I'm not sure if this is a bug, a feature request, or a confusion on my part. I'm am trying to get some of the features I like from VSCode. In particular, I'd like to have keyword expansion trigger snippet insertion in the buffer. I think this should be possible, but I'm not seeing the same set of options in my completion popup as I see in VSCode, and choosing the function completion only completes the word, rather than filling in a snippet template. Hopefully the images below help to explain the issue.
I think I'm using the same language server that VSCode uses -- mine is tsserver 0.9.5, from what I can tell vscode uses the same one.
Any hints? Thanks!
(company completion, lsp-completion-provider set to :capf)