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

Impossible to manually change indent style/size #362

Open
2 tasks done
ppo opened this issue Jan 29, 2024 · 1 comment
Open
2 tasks done

Impossible to manually change indent style/size #362

ppo opened this issue Jan 29, 2024 · 1 comment

Comments

@ppo
Copy link

ppo commented Jan 29, 2024

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

⚠️ VSCodium editorconfig-vscode
Version 1.85.2 0.16.6

Root .editorconfig File

# Define coding styles for editors.
#
# Doc: https://editorconfig.org/#file-format-details
# Ref: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties


# Stop looking for other `.editorconfig` files in parent folders.
root = true


# DEFAULT VALUES
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 100  # Pylint default.
trim_trailing_whitespace = true


# CSV
[*.{csv,tsv}]
indent_size = 50    # Large columns.
indent_style = tab  # Used as column separator.

# DIFF FILES
[*.{diff,patch}]
indent_size = 4
trim_trailing_whitespace = false

# INI FILES
[{*.ini,setup.cfg}]
indent_size = 4

# MAKEFILES
[Makefile]
indent_size = 4
indent_style = tab

# MARKDOWN
[*.{md,mdx}]
indent_size = 4
trim_trailing_whitespace = false

# MINIFIED FILES
# They shouldn’t be changed.
[**.min.{css,html,js}]
indent_style = ignore
insert_final_newline = ignore

# PYTHON
[*.py]
indent_size = 4

# RESTRUCTUREDTEXT
[*.rst]
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.* (currently .md but I often noticed this problem, but didn't think it was caused by this extension).

Additional comments or steps to reproduce

When I manually change the tab style and size for a file (via the bottom bar indicating the current style: size), it keeps changing back to my EditorConfig settings.
I tried disabling this extension (only) and reloading VSCodium, and then the problem doesn't occur anymore.

So I guess the EditorConfig is periodically reloaded? Or when I switch tabs?

UPDATE: It's happening when switching to another tab or to another app.

TO REPRODUCE: Manually change to Indent Using Tabs and select 8. Then in the bottom bar it says Tab Size: 8. After switching tab/app, the bottom bar mentions Spaces: 8 (Tab Size: 2).

@NikolaOroz
Copy link

When I manually change the tab style and size for a file (via the bottom bar indicating the current style: size), it keeps changing back to my EditorConfig settings.


This is intended behaviour and literally described inte the section "How it Works" of the README.md in this repo. What would be the point of the extension if you could just override the settings in .editorconfig with local editor settings?

image

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

2 participants