question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`tab_width` and `indent_size` shouldn't be mutual exclusive

See original GitHub issue

HarfBuzz (a highly used font related Linux package) uses a mix of tabs and spaces, see this for example https://github.com/harfbuzz/harfbuzz/pull/292

  • I have a question that is specific to this extension; thus, inappropriate for the main EditorConfig issue tracker.
  • I tried running code --disable-extensions and the issue did NOT present itself.

Issue

Visual Studio Code editorconfig-vscode
Version 1.20.1 0.12.1

Root .editorconfig File

root = true

[*.{c,cc,h,hh}]
indent_style = space
tab_width = 8
indent_size = 2

Are there any other relevant .editorconfig files in your project? No

File opened

Open https://github.com/harfbuzz/harfbuzz/blob/master/src/hb-aat-layout-morx-table.hh with vscode

Expected behavior

What is expected is somewhere between having or not having of indent_size, for example on this file it should be looked like and will happen if I remove indent_size = 2 from .editorconfig: screen shot 2018-02-20 at 2 30 00 pm however the issue is if I comment that line out and try to write something on a function block it will become like: screen shot 2018-02-20 at 2 32 26 pm

Actual behavior

But without commenting indent_size = 2 that it will look like: screen shot 2018-02-20 at 2 31 33 pm

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dlechcommented, Feb 25, 2019

The technical limitation in VS Code has been fixed by https://github.com/Microsoft/vscode/pull/62079, which will hopefully be in the 1.32 release.

So, this issue can be re-opened. The editorconfig extension will need to be modified to use the new editor.indentSize setting.

1reaction
ebraminiocommented, Feb 20, 2018

having this file I guess.

By file I meant this issue, that you’ve closed it correctly, not the .editorconfig, which does some other good things 😃 (and I am switching between the two modes, indent_size = 2 for editing, #indent_size = 2 for viewing, so it has some use to me at least 😛)

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: tabSize affects indentation #10339 - microsoft/vscode
For me, the use case is dealing with an old code base filled with a mix of tabs characters and space characters (but...
Read more >
How can I customize the tab-to-space conversion factor?
The number of spaces a tab is equal to. This setting is overridden // based on the file contents when `editor.detectIndentation` is true....
Read more >
Tabs and Indents | IntelliJ IDEA Documentation - JetBrains
Set the size of an indent (in a number of SPACE characters). Indent is a position of a text relative to the margin....
Read more >
Word Processing - Paragraph Indentation
Specifies indentation to be removed from the first line. This attribute and firstLine are mutually exclusive. This attribute controls when both are specified....
Read more >
Introduction — pycodestyle 2.10.0 documentation
This utility does not enforce every single rule of PEP 8. ... checks (unchecked if not set) --indent-size=n set how many spaces make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found