Variable: dtrt-indent-min-matching-indentations

dtrt-indent-min-matching-indentations is a customizable variable defined in dtrt-indent.el.

Value

1

Documentation

*Minimum number of distinct levels for an offset to be eligible.

The minimum number of distinct, non-zero indentation levels matching a given offset required to be present in a file for that offset to be eligible for guessing. A value of 2 means that for instance, an indentation level of 4 will only be guessed if some lines are indented at 4 spaces and some at 8; or if some lines are indented at 12 spaces and some at 20; but not if some lines are indented at 4 spaces but there are no other lines indented at an offset divisible by 4.

The default value of 1 effectively disables any such requirement. If you are getting false positives, you might want to set this to a higher value such as 2. However, a value of 2 means that the offset won't be guessed for files containing only flat constructs

Source Code

;; Defined in /nix/store/xl774j723v677bsfsybzln3vi6w0fpm3-emacs-packages-deps/share/emacs/site-lisp/elpa/dtrt-indent-20260709.2011/dtrt-indent.el
(defcustom dtrt-indent-min-matching-indentations 1
  "*Minimum number of distinct levels for an offset to be eligible.

The minimum number of distinct, non-zero indentation levels
matching a given offset required to be present in a file for that
offset to be eligible for guessing.  A value of 2 means that for
instance, an indentation level of 4 will only be guessed if some
lines are indented at 4 spaces and some at 8; or if some lines
are indented at 12 spaces and some at 20; but not if some lines
are indented at 4 spaces but there are no other lines indented at
an offset divisible by 4.

The default value of 1 effectively disables any such requirement.
If you are getting false positives, you might want to set this to
a higher value such as 2.  However, a value of 2 means that the
offset won't be guessed for files containing only `flat'
constructs"
  :type 'integer
  :tag "Minimum Depth"
  :group 'dtrt-indent)