editorconfig-vscode: 0.6.5 does not honor tab size settings

editorconfig-vscode version: 0.6.5

Expected behavior

Tab size settings applied to editor in workspace

Actual behavior

Invalid tab size in editor

Steps to reproduce the behavior

root = true

[*]
indent_style = space
indent_size = 4

[*.{c,cpp,h,hpp,proto}]
indent_style = tab
indent_size = 2

indent_style is tab but I still see indent_size = 4 in editor:

zrzut ekranu z 2017-04-10 09-30-12

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 25 (11 by maintainers)

Most upvoted comments

Hi, @jedmao. In my case, there is no any output (no EditorConfig option in the output window). I think the extension fails to start. I also found that there are some error messages at the developer tools:

[Extension Host] Activating extension `EditorConfig.EditorConfig` failed: Cannot find module './InsertFinalNewline'.
[Extension Host] Activating extension `EditorConfig.EditorConfig` failed:  Cannot find module './InsertFinalNewline'
[Extension Host] Here is the error stack:  Error: Cannot find module './InsertFinalNewline'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Function.J.i._load (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:4:374825)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/bist/.vscode/extensions/EditorConfig.editorconfig-0.7.0/out/src/transformations/index.js:2:28)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Function.J.i._load (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:4:374825)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/bist/.vscode/extensions/EditorConfig.editorconfig-0.7.0/out/src/DocumentWatcher.js:14:27)
    at Module._compile (module.js:556:32)
Activating extension `EditorConfig.EditorConfig` failed: Cannot find module './InsertFinalNewline'.

@ianlini thank you! I know exactly what’s going on now. I must have done a rename on that particular file at some point and because I already had insertFinalNewline.js in my compiled out/ folder, every time I ran the TypeScript compiler w/ the tsc command it just overwrote it w/o changing it to InsertFinalNewline.js. Notice the capital “I” at the beginning! I’m going to publish a patch right now.

I can reproduce this error with empty project.

@jedmao I always use a precompile npm script with rimraf ./outDir. Saves the hassle.

@jedmao Case-sensitivity is a bitch when developing on Windows and targeting Unix-style OS. Maybe you should add "forceConsistentCasingInFileNames": true in your tsconfig.json.

Thank you @jedmao! v0.9.1 fixed my problem.