Currently the format_completion tries to have a one size fits all way to display LSP CompletionItem information.
That proven to not be ideal for some LSP servers.
While I am ok with the way that format_completion currently works,
it makes sense to expose an API to LSP-packages
to allow changing what will be used for the Sublime Text CompletionItem.trigger, CompletionItem.annotation, and CompletionItem.details.
Note to avoid performance issues, because format_completion can be called often,
the api must take that into account.
Currently the format_completion tries to have a one size fits all way to display LSP CompletionItem information. That proven to not be ideal for some LSP servers.
While I am ok with the way that format_completion currently works, it makes sense to expose an API to LSP-packages to allow changing what will be used for the Sublime Text CompletionItem.trigger, CompletionItem.annotation, and CompletionItem.details.
Note to avoid performance issues, because
format_completion
can be called often, the api must take that into account.related: https://github.com/sublimelsp/lsp/issues/1924 https://github.com/sublimelsp/LSP/issues/569 https://github.com/sublimelsp/LSP/pull/2293 - we might allow LSP-* packages to alter the label https://github.com/sublimelsp/LSP/issues/1833#issuecomment-906724811 - see if we can avoid this issue as well