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

Simple Word Completion #198

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

polgartom
Copy link
Contributor

@polgartom polgartom commented Sep 29, 2023

Maybe too complicated in some places, because I don't know the source code fully, so maybe you can do it a simpler way. I've been using this for the past 2 months, and it's not as annoying as LSP is (at least for me). Maybe we need to do some cleanup on this, but initially, I just want to create something that is good and simple.

The extra features:

  • Checks the distance between your FIRST cursor and the found word (or subwords) and provides results accordingly.
  • If your starting word slice begins with an uppercase letter, it will prioritize words starting with uppercase letters, followed by words starting with lowercase letters. (can be so useful when you search for a macro or constant)
  • You can search for subwords (this feature only works with snake_case words). Subword search combines the two features mentioned above and it first lists words without underscore characters, then words with underscore characters.

Start/Step forwards: Ctrl-E
Start/Step backwards: Ctrl-Q
Start/Step forwards (subwords): Ctrl-R (then you can use Ctrl-E and Ctrl-Q too for stepping between results)

@focus-editor
Copy link
Owner

I will review this next week when I'm back from my trip and have cleared the backlog of stuff I have - will do before the next release.

@ustance
Copy link
Collaborator

ustance commented Oct 3, 2023

Checked it out a few days ago, was working pretty nice. Hope it gets merged, it's a solid step towards Jails/lsp support :)

@focus-editor
Copy link
Owner

Sorry for taking this long. I haven't forgotten about it - been sick and didn't work on the editor at all.

@focus-editor
Copy link
Owner

This is getting delayed since I need to take a very careful look at it and we barely have the time to finish the remaining things for the release

@polgartom
Copy link
Contributor Author

polgartom commented Dec 20, 2023

This is a simple stuff which search the buffer for words. I cannot live without that but probably you want to refact the whole thing as it is with more optimization.

@focus-editor
Copy link
Owner

OK finally I'm ready to look at this. Thanks for waiting

@focus-editor
Copy link
Owner

I've tried it once again. The reason I needed to take a careful look at it was because when I tried it at first I wasn't very happy with the behaviour and felt the need to redo it.

I hope you're OK if I use your code as a reference and implement the behaviour I'd intended to implement originally.

@polgartom
Copy link
Contributor Author

If you able to use anything from it then just go ahead. :)

@focus-editor focus-editor added this to the 0.4.0 milestone Apr 6, 2024
@focus-editor focus-editor added the kept-for-reference This PR won't be merged but instead will be used as a reference when solving the underlying problem label Apr 6, 2024
@focus-editor
Copy link
Owner

I haven't forgotten about it, just super busy. Completions should be coming in 0.4.0 (but we haven't shipped 0.3.6 yet :( )

@polgartom
Copy link
Contributor Author

Hi! Oh thats gonna be cool it has so many good features already. Yeah, well I just try to keep it uptodate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kept-for-reference This PR won't be merged but instead will be used as a reference when solving the underlying problem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants