company-lsp
company-lsp copied to clipboard
Post completion handling should check whether yasnippet is enabled
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.
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.
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.