Skip to content

Commit

Permalink
Add indent_method property for nontrivial indentation methods
Browse files Browse the repository at this point in the history
This PR aims to solve the requirement of editorconfig/editorconfig#323 to add support for `smart_tabs`.

I propose to add a generic `indent_method` property to be able to
1. add support for non-trivial indentation methods
2. allow a backward compatible definition of indentation methods. Therefore the `indent_method` may override indent size and style if required.

I added two common (?) methods for the beginning: `smart_tabs` and `elastic_tabs`, the list may grow in the future.

I would prefer to also explain what `smart_tabs` and `elastic_tabs` refer to, for this it would be necessary to write a small explanation to avoid the risk any referenced website goes down.

What do you think?
  • Loading branch information
florianb committed Sep 25, 2023
1 parent e02645d commit 137262f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ and the supported values associated with them:
equals ``tab``, the ``indent_size`` shall be set to the tab size, which
should be ``tab_width`` (if specified); else, the tab size set by the
editor. The values are case insensitive.
* - ``indent_method``
- Set to ``smart_tabs`` or ``elastic_tabs`` to use a smart tabs respectively elastic
tabstops (when supported). The given tabstop method may override the ``indent_style``
or ``indent_size`` settings as required.
* - ``tab_width``
- Set to a whole number defining the number of columns used to represent
a tab character. This defaults to the value of ``indent_size`` and should
Expand Down

0 comments on commit 137262f

Please sign in to comment.