Skip to content

Add autocompleteBraces setting to Behavior configuration#365

Open
William-Laverty wants to merge 1 commit intoCodeEditApp:mainfrom
William-Laverty:fix/autocomplete-braces-setting
Open

Add autocompleteBraces setting to Behavior configuration#365
William-Laverty wants to merge 1 commit intoCodeEditApp:mainfrom
William-Laverty:fix/autocomplete-braces-setting

Conversation

@William-Laverty
Copy link

Summary

The autocompleteBraces setting existed in CodeEdit's preferences UI but was never passed through to the source editor, making the toggle completely non-functional.

This PR adds the autocompleteBraces property to SourceEditorConfiguration.Behavior and conditionally sets up bracket pair filters based on its value.

Changes

  • Added autocompleteBraces: Bool to Behavior (defaults to true for backward compatibility)
  • Updated setUpTextFormation() to skip open/delete pair filters when autocompleteBraces is false
  • Updated didSetOnController to re-run text formation setup when the setting changes

Related

The autocompleteBraces setting existed in CodeEdit's preferences but was never
passed through to the source editor. This adds the setting to the Behavior
configuration struct and conditionally sets up bracket pair filters based on
its value.

When autocompleteBraces is false, both the open pair filters and delete pair
filters are skipped, preventing automatic insertion of closing brackets.

Fixes CodeEditApp/CodeEdit#1691
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.

🐞 Autocomplete Braces setting is completely non-functional

1 participant