Replies: 1 comment
-
Good topic, and it's something that was mentioned before. Let me turn it into an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wish to improve user experience when using company-capf with lsp clients. Here is my proposal. I'll describe briefly how company + lsp capf works and then explain how
:complete-function
can help here.When you press ENTER after selecting a candidate from the popup, company + lsp clients' capf work in this way:
:exit-function
, in which it deletes what has been inserted in step 2, and then inserts what's really desired (may need to expand a snippet via yasnippet)here is an example.
I have input "add", this is the prefix. Now I'll simulate step by step how company + lsp capf works
Now you'll get what you really want (a snippet pre-filled with what jdt.ls thinks suitable as arguments)
Now I'll describe how
:complete-function
can improve this situation. With:complete-function
, company + lsp capf works in this way::complete-function
, in which it deletes the prefix, and then inserts what's desired. (Very similar to what:exit-function
does in this lsp case)Because of no need to insert "addRound(BigDecimal a, BigDecimal b, Integer scale) : BigDecimal" and then delete it, and then insert what needed, compeltion will be more smooth and with less filicker.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions