-
-
Notifications
You must be signed in to change notification settings - Fork 911
Fix keyword auto-completion in classes for iph #2387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When auto-completing public, ... at the start of a class, Intelephense sends `CompletionList's that have no :isIncomplete fields (a spec violation), causing `lsp-completion--sort-completions' to get a `CompletionList' instead of a list of `CompletionItem', `error'ing. Extend `lsp-interface' to take an optional fourth list of semi-optional arguments (like optional but without a ?) for each interface tuple. Define `CompletionList' so that is-optional is semi-optional.
9129223
to
d86aa7b
Compare
Is this reported upstream? Also, can we replace this one with a local patch(e. g. check only if :items are present to determine the type of the object) instead of introducing the patch on the global level? |
@yyoncho this is more-or-less a local patch: |
I don't know whether this can be raised upstream - I cannot submit a PR, given that |
|
My change doesn't break anything - all previous uses of (funcall (-lambda ((a b c d)) d) '((a))) ; nil, not error, even though we are missing three elements
(let (foo) (pop foo)) ; nil
(pop nil) ; error: setf nil That also means that interface triples can also be pairs, or even one-tuples. |
The issue is that we add a parameter that makes little sense and it is hard to explain. Using |
I think we will actually need to check for Anyway, this is clearly spec violation, and the more we support those behaviors, the more our code become unmanageable. Extending the interface to accommodate the kind of semi-optional is not making sense too. We can actually ask the user of |
This is what I initially suggested. Spent some time analyzing the code and you will end up with the conclusion that using |
Ah, yes, that would work too. |
The issue is with the merge function and we do not expose |
When auto-completing public, ... at the start of a class, Intelephense
sends
CompletionList
s that have no :isIncomplete fields (a specviolation), causing
lsp-completion--sort-completions
to get aCompletionList
instead of a list ofCompletionItem
,error
ing.Extend
lsp-interface
to take an optional fourth list of semi-optionalarguments (like optional but without a ?) for each interface tuple.
Define
CompletionList
so that is-optional is semi-optional.