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

Rework word completion: Use Gee.TreeMap instead of custom prefix tree #1490

Closed
wants to merge 47 commits into from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Dec 2, 2024

An experiment arising from #1487, an attempt to address some of the shortcomings of the current plugin. Much of the extra code is commentary. Also, this PR works entirely with unichar and the builtin definition of DELIMITERS rather than sometimes using TextIter functions to find word boundaries and sometimes using split_set which do not necessarily agree.

Not sure how this will scale up to very large documents but Code is intended for code files which are generally modest in size.

Pushing for visibility but will probably make a new cleaner PR from scratch judged an improvement.

colinkiama and others added 30 commits November 2, 2024 12:33
… completion plugin

The 'insert_text' signal gives more detail about how the document contents have changed, giving us a way to more accurately update the prefix tree used for word completion
* Detect when cursor moves off insertion line
@jeremypw
Copy link
Collaborator Author

jeremypw commented Dec 3, 2024

Closing as although it is almost working, it turned out not to have material advantages.

@jeremypw jeremypw closed this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants