Skip to content
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

LSP completion only works directly after -> or :: #2318

Closed
jorams opened this issue Nov 9, 2019 · 2 comments
Closed

LSP completion only works directly after -> or :: #2318

jorams opened this issue Nov 9, 2019 · 2 comments

Comments

@jorams
Copy link
Contributor

jorams commented Nov 9, 2019

Right now, LSP completions only work up to two characters away from the "gap", which is -> or ::.

class A { function test() {} }
$a = new A;
// Typing 'te' completes 'test'
$a->te{st}
// Typing 'tes' completes nothing
$a->tes

I imagine VS Code just keeps using the previous completions if you keep typing, but not all clients do and even if you start later in an existing symbol there should still be completions.

A solution I have now (18454a5) is to check crudely whether or not we are still in the first name after the gap, and return completions if so. This fixes the above issue, but also produces quite a lot of false positives.

What could be a better way to approach this?

@muglug
Copy link
Collaborator

muglug commented Nov 28, 2019

but also produces quite a lot of false positives

What sort of false-positives?

@orklah
Copy link
Collaborator

orklah commented Nov 7, 2021

Closing as stale

@orklah orklah closed this as completed Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants