-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Completion by words in all loaded documents #3328
Conversation
See #2403 |
Current solution gather completion options from all loaded documents/buffers and merge it with language server response. Very often langauge server don't give me suggestions on sophisticated python code (too many magic and meta programming). I'm create this PR as draft, because know it not so optimal yet. But it works well for my cases. For my happiness I need on helix only ths things:
Sorry for my poor English and not usefull noise here |
#2403 has a better implementation but I'm still concerned about performance. |
New approach. Draft not fully implemented yet. workflow
todo:
Please, check this out. |
any way i'm continued to implementing this feature and now it works like that Words associated with doc and doc-line on two separate hashmaps
The PR is not perfect and may be improved by this tasks
imho PR ready to review |
@estin Thanks a lot for this PR 🙇 |
@estin Thanks for this PR. Same problem here with elixir. |
cc4fdd5
to
4138ab2
Compare
@estin Not sure if it is problem in your PR specifically, but I notice a strange behavior with the
See recording here: https://asciinema.org/a/zeenKdKViSoTQiYrodanWIhez |
The text getting stuck happens in other circumstances too. |
@IvanGoncharov I hope @AceofSpades5757 Can you show me another completion menu stuck?
Seems some bug on master, but I don't investigate time to research/solve it |
@estin Thanks, I can confirm it's fixed 😄 I also found another one, your completion doesn't honor |
nice!
It's was planned like that. There are two modes:
P.S. I don't believe about that PR would be merge to upstream in near future. But it's allow me use helix as my primary editor, and I will sync it with master periodically for my personal usage ) |
@estin Thanks for the explanation. For now, I'm totally happy with PR, and big thanks for keeping it up to date 👍 |
e3b9ed1
to
f80cd92
Compare
Thanks @estin 👍 |
c71819e
to
255c406
Compare
cf5e8f5
to
1490fb5
Compare
1490fb5
to
b1c0d96
Compare
57d69c3
to
5124897
Compare
5124897
to
048d5cd
Compare
048d5cd
to
cea3076
Compare
@estin Big thanks for keeping this PR up to date for almost a year 🙇 |
@estin great work. I can't see I'm using Helix without it anymore. |
Currently this PR is HACK, and marked as draft again.
To resolve this changes currently introduced in languages.toml
May be this task must be solved in language server terms #6731 To enable words comletion on document without language server
Future plans on this PR
|
This feature should be possible to implement efficiently by running aho-corsik on the current buffer (as an async completion task, the infrastructure is already provided by the multi lsp PR). aho-corsic already implements a streaming matcher (so works efficiently with ropey) and an (ASCII) ignore case option. Simply collecting all matches into a For performance reasons I dont think we want to run completions for every buffer tough. Instead the completion should simply scan the current buffer which is what you want in most cases anyway. |
Multi lsp feature allow to use external language server for completion. For my use cases works fine with https://github.com/estin/simple-completion-language-server By #3328 (comment) I will try implement naive not optimized language server
|
Nice work @estin and thank you for work on it. |
Hi!
Draft: completion by words in all loaded documents
Works for document
May be such feature must be implemented via plugins in future?