Skip to content

Indentation detection doesn't work with 3-spaces #17639

@jiggak

Description

@jiggak
  • VSCode Version: 1.8.1
  • OS Version: any

Steps to Reproduce:

  1. Set the following settings:
{
   "editor.tabSize": 3,
   "editor.insertSpaces": true,
   "editor.detectIndentation": true
}
  1. Open source file that uses 3-space indentation
  2. Notice guessed indentation is not 3-spaces (typically guesses 4)

After attempting to debug this it became clear pretty quickly. The indentationGuesser is designed to work with 2, 4, 6, and 8 spaces.

So is it feasible to make the indentation guesser work with odd-number space indentation? If not there should probably be something somewhere to tell you the indent detection only works with 2, 4, 6, 8 spaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    editor-coreEditor basic functionalityfeature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions