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
company-yasnippet and returning "" for prefix #641
Comments
Why does this happen? The length of |
|
I think completion triggers after typing the "." but it's not included in the prefix. |
|
That's probably because you have another backend in the same group that triggers it. |
|
Yup! It's part of a grouped backend. |
|
We could somehow filter out backends that don't report a long enough prefix inside That would solve the problem in a general way. As far as your proposed change goes, it's too personal, I think. You can just as well add an advice to it. |
|
Thanks! I'll go with the advice then. |
…eparately This should help with #1398, #641, #553, #485, #1147, #840 With some of the above already closed, and some describing more serious scenarios than others. Anyway, this is a halfway step to dropping framework-level caching (or moving it to backends). For now this seems like an adequate solution, given that the most "heavy" backend these days is `company-capf`, which disables caching already. Though `company-dabbrev-code` is a close next.
…eparately (#1405) * company--multi-backend-adapter: Consider min prefix in 'candidates' separately This should help with #1398, #641, #553, #485, #1147, #840 With some of the above already closed, and some describing more serious scenarios than others. Anyway, this is a halfway step to dropping framework-level caching (or moving it to backends). For now this seems like an adequate solution (resetting the cache sometimes when the new chars are typed), given that the most "heavy" backend these days is `company-capf`, which disables caching already. Though `company-dabbrev-code` is a close next. Uses new semi-private backend action called 'set-min-prefix', to keep the merging function's backward compatibility, for the sake of external callers.
|
Check out the latest master, the behavior should be improved. |
It looks like for 'prefix case, company-yasnippet always returns at least "".
This is somewhat painful when setting minimum-prefix-length to 1 and after something like "." completion.
this.| triggers company-yasnippet because the prefix will be "" but I'm not sure I'll ever want yasnippet to trigger in that case.
Changing the function to be,
lets me not see any yasnippet completions for the 'this.' case.
I'm not sure if this is a good approach though since I don't use manual completion and there may be a chance we want the "" prefix back from yasnippet?
This is, at the very least, a feature request to make this behavior configurable. I can do a pull request if this approach is acceptable.
The text was updated successfully, but these errors were encountered: