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

Indent Options and Clarify Tab Width #171

Merged
merged 7 commits into from
Mar 28, 2023

Conversation

thecoolwinter
Copy link
Collaborator

Description

This is a near clone of #147, but git got messed up on that branch. This PR improves that branch anyways.

This enables configuration of the behavior when the tab key is pressed. Previously all tabs were converted to spaces and inserted tabWidth spaces in place of the tab character. This PR clarifies that the tabWidth parameter should be used for the visual width of tabs, and adds an indentOption parameter that specifies how to handle inserting tab characters.

Adds an IndentOption enum with two cases for this behavior:

  • spaces(count: Int)
  • tab

If spaces(count: Int) is specified, the editor will insert the given number of spaces when the tab key is pressed, otherwise the tab character will be kept.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

tab.mov

Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

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

Looks great! Approving, but take note of my comments.

Copy link
Member

@lukepistrol lukepistrol left a comment

Choose a reason for hiding this comment

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

👍

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.

3 participants