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 option to not overtype on closing pairs #10301

Closed
wants to merge 0 commits into from

Conversation

SoahLi
Copy link

@SoahLi SoahLi commented Apr 8, 2024

Solution to #9595

Vscode uses three modes(always, auto - only skip over auto generated closing pairs, and never) for autoCloseOvertype, while my implementation only uses two(always and never).

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

@tumblinx tumblinx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good

@pascalkuthe pascalkuthe added the S-waiting-on-review Status: Awaiting review from a maintainer. label Apr 14, 2024
helix-view/src/editor.rs Outdated Show resolved Hide resolved
@@ -913,6 +915,7 @@ impl Default for Config {
popup_border: PopupBorderConfig::None,
indent_heuristic: IndentationHeuristic::default(),
jump_label_alphabet: ('a'..='z').collect(),
auto_closing_overtype: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to rename it to overtype but I don't know how the maintainers feel about this

Copy link
Member

@kirawi kirawi Apr 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or it might be better to refactor AutoPairConfig into a struct (moving the current enum into a new one) and putting overtype under it. This would be a breaking change though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a new commit with the suggested changes. Instead of implimenting the From trait like original did, it felt more appropriate to add a get_pairs function that returns the enum value instead.

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 S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants