-
-
Couldn't load subscription status.
- Fork 940
Provide trigger character hint to company-mode #123
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
Provide trigger character hint to company-mode #123
Conversation
If the server provides trigger characters and the point is after one of them, set :company-prefix-length to t so that company-capf always shows completion candidates regardless the actual length of the prefix (which is likely to be 0).
|
Works for me :) @vibhavp anything against merging? :) |
|
No issues as such, but this ends up adding a soft dependency on company-mode, right? |
|
You mean that it only works with company? Yeah you are probably right. Maybe the annotation could be made configurable |
|
@vibhavp It does provide company-only feature, since trigger character doesn't make sense to completion-at-point. @bkchr I'm on the fence whether to add a custom variable to toggle it. It doesn't take much time to get the trigger characters. IMO it's not a good experience to have a long list of customizable settings for every tiny details. |
|
@tigersoldier I came across your https://github.com/tigersoldier/company-lsp project. I think, if that supports the trigger characters for company, it is okay to not merge the feature into lsp-mode directly. |
@bkchr My fault, I've wrote that functionality. |
|
@sebastiencs yeah no problem! :) Just thought loud about how the projects could be working together :) |
|
@bkchr I agree both projects can work better together and would love to push features upstream. Just wanted to get the feature landed quickly so I can use it :) Back to the topic of this PR. My original plan was to implement all company-related feature here and just deprecate company-lsp in favor of Let's close this PR. |
|
@tigersoldier I've added support for async requests in b56a06e. If that helps, |
|
Sure, I'll update it. |
If the server provides trigger characters and the point is after one of them,
set :company-prefix-length to t so that company-capf always shows completion
candidates regardless the actual length of the prefix (which is likely to be 0).