Open netjune opened 4 years ago
It seems that whether the cache is enabled or not, the issue happens.
Now I think it is bug of company-mode. It only compares the current point with the saved one to decide whether to refresh candicates. In this case, the point doesn't change, but the prefix has changed (to nil).
I set company-lsp-cache-candidates to t.
For example, in a go-mode buffer, the content:
Cursor is at the char '|' and there are completions with prefix "ch". After a command(yas-expand), "ch" becomes "<-".
Now the completion prefix is nil. company-mode still call the backend with arg 'match. Then company-lsp gets the prefix. The prefix is nil which cause the error.
It runs the code:
(downcase nil)