Adds an indentOption binding to the initializer to determine the editor's behavior on a tab key press. Before, our indent string was determined by creating a string repeating the space character tabWidth times. tabWidth should be used for the number of spaces a tab character takes up visually, and will have to be in a different PR. This PR also removes the TabReplacementFilter object as it's no longer needed.
IndentOption is a Codable-conforming enum that can be either spaces with a number of spaces to insert, or tabs. The Codable inheritance was added due to the fact that this option will most likely be stored for user preferences.
This PR will have a related PR in CodeEdit for the settings required to enable this functionality.
Description
Adds an
indentOption
binding to the initializer to determine the editor's behavior on a tab key press. Before, our indent string was determined by creating a string repeating the space charactertabWidth
times.tabWidth
should be used for the number of spaces a tab character takes up visually, and will have to be in a different PR. This PR also removes theTabReplacementFilter
object as it's no longer needed.IndentOption
is a Codable-conforming enum that can be either spaces with a number of spaces to insert, or tabs. The Codable inheritance was added due to the fact that this option will most likely be stored for user preferences.This PR will have a related PR in CodeEdit for the settings required to enable this functionality.
Related Issues
80
Screenshots
https://user-images.githubusercontent.com/35942988/219971634-f28b7644-d64c-4f79-8f47-e6de54f6b498.mov