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

Add an editor option for keeping completion placeholders. #7480

Closed
wants to merge 1 commit into from

Conversation

gibbz00
Copy link
Contributor

@gibbz00 gibbz00 commented Jun 29, 2023

I keep finding myself having to retype them again.

Possibly relevant commit: ba24cfe

@kirawi kirawi added A-helix-term Area: Helix term improvements C-enhancement Category: Improvements labels Jun 30, 2023
@pascalkuthe
Copy link
Member

see #7045

@gibbz00
Copy link
Contributor Author

gibbz00 commented Jul 1, 2023

I did see some PR/issues regarding completion handling, and I do understand that support isn't entirely there yet. Ideally, I would love to be able to have a keybinding that it inserts the virtual placeholder text before "tabbing" to the next placeholder.

Right now, however; all placeholders are removed as soon as the first argument is being filled in, which kind of defeats the purpose of having them in the first place.

It is also a lot more efficient for me to retype the arguments that don't have variables of the same name already in scope, than to retype those that do. This was the primary motivation for this PR.

test.mp4

Now, I don't want to say that one way is better than the other, but this gives users at the very least a choice until the underlying completion system is fledged out.

@AloeareV
Copy link
Contributor

I am enthusiastically in favor if this feature!

@ModProg
Copy link

ModProg commented Oct 2, 2023

I have this use case quite often, when e.g., implementing traits in rust, by calling said trait's function on a field.

I'd be fine with having them replaced as soon as you start typing when navigating to one of them, but keeping them when not replaced.

@So1aric
Copy link

So1aric commented Oct 24, 2023

Yep, this is also helpful when writing C code. For example, when you define a prototype in a header file and go to a C file to implement it, Clang will give a snippet which is pretty helpful. However, Helix will then delete it 😢

@gibbz00
Copy link
Contributor Author

gibbz00 commented Apr 6, 2024

@pascalkuthe what's the status on this PR?

@the-mikedavis
Copy link
Member

#9801 is the proper fix for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants