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

allow configuring smart tab to always trigger completion instead #10537

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

doy
Copy link
Contributor

@doy doy commented Apr 21, 2024

it's always been pretty difficult to reliably use tab to select completions - if autocompletion is enabled, it's very easy to press tab before the autocomplete menu loads, which previously just inserted a literal tab and now jumps the cursor around unexpectedly. i'd really like to be able to use tab solely for completion, and this accomplishes that pretty well. the main thing i'm unsure about here is how the configuration should work here - it feels like this would be a lot simpler if i could just map the smart tab action to an arbitrary command, but MappableCommand is defined in helix-term, so it's not available to use as part of the editor.smart-tab config section which is defined in helix-view. that said, there aren't really that many other actions that really make sense to be triggered by smart tab, so maybe this is fine? we could also potentially replace enable: true with mode: InsertTab or something along those lines, but i don't really have strong feelings either way there.

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Apr 21, 2024
@pascalkuthe
Copy link
Member

smart tab needs larger changes (particularly to integrate with snippets).

Instead of changing the existing config we should allow people to make arbitrary keybindings mapped to smart tab. That is blocked on some larger architectural changes.

I am also more and more convinced that tab is overused. I actually want to remove tab from the default completion menu bindings because it conflicts with snippets (its annoying you have to press enter before you can tab trough the snippet). <c-n> and <c-p> are better bindings.

So I would rather not go forward with this instead wait on the larger refactors that make smart tab bindable to anything. You can keep this as a personal branch but I don't think I would merge 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants