company-lsp icon indicating copy to clipboard operation
company-lsp copied to clipboard

Post completion handling should check whether yasnippet is enabled

Open yyoncho opened this issue 6 years ago • 2 comments

Post completion should display a warning if snippets are enabled but yasnippet is not. In this case, the user must either disable company lsp snippets or enable yasnippet.

yyoncho avatar May 18 '18 11:05 yyoncho

How about falling back to insert-text, if available?

The LSP client needs to tell the server whether snippet is supported on server initialization. After initialization, there is no API to disable it.

I was thinking about checking yasnippet is enabled before sending the snippet support. However there are chances yasnippet is initialized after lsp. Don't have idea on how to solve this yet.

tigersoldier avatar May 19 '18 01:05 tigersoldier

How about falling back to insert-text, if available?

Will the insert text be something like foo($1:bar)? If not I guess it is an option. But at least there should be some pointers that enabling yasnippet will enable this feature.

After initialization, there is no API to disable it.

Yep, this has to be fixed on lsp-mode side. There is lsp--set-configuration but it is not easy to use it just to update one setting.

yyoncho avatar May 19 '18 04:05 yyoncho