Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't apply/recognize the rules until I open .editorconfig file #326

Open
2 tasks
seahindeniz opened this issue Oct 27, 2021 · 2 comments
Open
2 tasks

Comments

@seahindeniz
Copy link

seahindeniz commented Oct 27, 2021

Please fill-in this template.

  • 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.61.2 0.16.4

Root .editorconfig File

root = true

[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.js]
indent_style = space
indent_size = 4

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

Visual Studio Code Setting Default User Workspace
editor.insertSpaces true ____ ____
editor.tabSize 4 2 _
editor.trimAutoWhitespace true ____ ____
files.autoSave "off" "___" "___"
files.insertFinalNewline false _____ _____
files.trimTrailingWhitespace false _____ _____

File opened

./foo.js

Expected behavior

indent_size = 4

Actual behavior

indent_size = 2

Additional comments or steps to reproduce

I think the extension doesn't get activated after connecting to a remote host. I have to trigger the extension to recognize my rules once I open my .editorconfig file.

  • Have a remote server that can accept SSH connections
  • Create a project folder that contains .editorconfig
  • Have a JS file ready
  • Follow the instructions in https://code.visualstudio.com/docs/remote/ssh#_installation to install the Remote Development extension set.
  • Open an SSH connection with a remote server inside the VSCode via the RD extension
  • Open the JS file and expect it to have 2 spaces for indentation
  • Open the .editorconfig file and observe the visual changes on the JS file.
  • The spaces indicator in the status bar shows 4 instead of 2 after opening the .editorconfig
@Drarig29
Copy link

Same for me and it's not even on a SSH connection.

It's not until I open .editorconfig, but until I switch to any tab.

@jacksontong
Copy link

it's annoying that I have to open .editorconfig file to active the extension each time I open VSCode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants