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
80 - Does not close, needs an additional PR for the tab width setting.
Description
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 thetabWidth
parameter should be used for the visual width of tabs, and adds anindentOption
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
80 - Does not close, needs an additional PR for the tab width setting.
Checklist
Screenshots
https://user-images.githubusercontent.com/35942988/228014785-85a20e2e-0465-4767-9d53-b97b4df2e11e.mov