Giter VIP home page Giter VIP logo

Comments (18)

rizkysyazuli avatar rizkysyazuli commented on August 20, 2024 2

same problem. got this in .editorconfig:

indent_size = 2

and this in my VS Code user settings:

"editor.tabSize": 4

the VS Code setting won. i got four spaces when hitting tab and during auto indent.

so, about the last comment @tysonnero

If you're having the same issue, just try disabling them one by one to find the culprit.

did you found out specifically which plugin is the culprit?

from editorconfig-vscode.

tysonnero avatar tysonnero commented on August 20, 2024 1

@joeyfigaro sorry, I totally forget. I should of mentioned it before. I'm actually on a totally new machine now and don't even have VS Code installed...

If you're having the same issue, just try disabling them one by one to find the culprit.

from editorconfig-vscode.

jednano avatar jednano commented on August 20, 2024

I don't own a Mac, so I'm afraid I can't assist in diagnosing or fixing this problem. Anyone else listening who has a Mac?

from editorconfig-vscode.

SamVerschueren avatar SamVerschueren commented on August 20, 2024

I'm on a mac and use this plugin every day. Are you sure it's this plugin that fails? Are the VS Code versions between Windows and macOS the same? Are the installed extensions the same?

Can you share the VS Code version and your .editorconfig file?

from editorconfig-vscode.

tysonnero avatar tysonnero commented on August 20, 2024

@SamVerschueren Maybe my .editorconfig file is messed up or it needs to be somewhere else in the directory structure. I feel like WebStorm and Visual Studio both respect it for this project.

# editorconfig.org
root = true

; 2-column tab indentation
[*.js]
indent_style = space
indent_size = 2

[*.{css,scss}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

from editorconfig-vscode.

SamVerschueren avatar SamVerschueren commented on August 20, 2024

Is this valid? ; 2-column tab indentation. Try using # for comments. Just guessing here... (on mobile now).

from editorconfig-vscode.

jednano avatar jednano commented on August 20, 2024

@tysonnero you could also use one of the EditorConfig cores to verify that the file in question is applying the appropriate settings before assuming the editor plugin is at fault. Try this core in the CLI, since it's the same code the plugin uses for vscode: https://www.npmjs.com/package/editorconfig

from editorconfig-vscode.

tysonnero avatar tysonnero commented on August 20, 2024

@SamVerschueren I tried removing the ";" commenting (although valid) but still no luck.

@jedmao I'll give that a try. In the interim, I opened the same project in WebStorm. WebStorm honored the .editorconfig out of the box. I even modified the .editorconfig settings, and WebStorm immediately accommodated.

from editorconfig-vscode.

tysonnero avatar tysonnero commented on August 20, 2024

okay so I moved the indent_style to be global as so:

[*]
indent_style = space

That seemed to do the trick...

from editorconfig-vscode.

tysonnero avatar tysonnero commented on August 20, 2024

spoke to soon... it's actually not working even with that change...

from editorconfig-vscode.

tysonnero avatar tysonnero commented on August 20, 2024

Had a conflicting extension installed which was overriding Format Code spacing. My bad!

from editorconfig-vscode.

joeyfigaro avatar joeyfigaro commented on August 20, 2024

@tysonnero ...which extension was it?

from editorconfig-vscode.

joeyfigaro avatar joeyfigaro commented on August 20, 2024

@tysonnero Thanks bud. 🤘

from editorconfig-vscode.

psrivastava avatar psrivastava commented on August 20, 2024

ran into similar problem & what I've learnt is. Specifying things at Global level & then if you need to override at individual filetype level is the way to solve this issue. May it needs things to be atleast defined once at global level

from editorconfig-vscode.

psrivastava avatar psrivastava commented on August 20, 2024

@rizkysyazuli

from editorconfig-vscode.

rizkysyazuli avatar rizkysyazuli commented on August 20, 2024

@psrivastava what do you mean by "Specifying things at Global level"? globally as in the [*] scope?

from editorconfig-vscode.

psrivastava avatar psrivastava commented on August 20, 2024

@rizkysyazul , thats correct. As soon as I did that, (which applied defaults for all) , then individual settings started to work

from editorconfig-vscode.

jordydickinson avatar jordydickinson commented on August 20, 2024

I was having this same problem, and it turned out to be an extension called stkb.rewrap (https://github.com/stkb/Rewrap).

from editorconfig-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.