godotengine / emacs-gdscript-mode

An Emacs package to get GDScript support and syntax highlighting.
GNU General Public License v3.0
316 stars 36 forks source link

The editorconfig settings are overridden #48

Open oeN opened 4 years ago

oeN commented 4 years ago

I'm submitting a...

Bug report

I have the editorconfig package enabled and an .editorconfig file:

root = true

[*]
indent_size = 2
indent_style = tab

[*.yml]
indent_style = space
indent_size = 2

I'm using Doom Emacs :)

What is the current behavior? When editing a gdscript file indenting from the NORMAL mode with Shift+>+> works correctly but from the INSERT mode if I press tab the indent size used is 4.

If I change the indent size to 2 with gdscript-indent-offset it works as expected

What is the expected behavior? Let the editorconfig preference overrides the indent size configured for gdscript-mode

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Enable the editoconfig package
  2. Create an .editorconfig file like the one above (or with different indent size between editor config and gdscript-mode)
  3. Try to indent a line

Thanks!

NathanLovato commented 4 years ago

Thanks for the report. That's strange to me, gdscript-indent-offset shouldn't affect anything other than .gd files.

oeN commented 4 years ago

Thanks for the reply :) Sorry, I didn't explain well enough, the problem is on the .gd files this problem doesn't affect other file types, for example on a .py file the indentation is consistent between the TAB and the >+> of evil

jcs090218 commented 1 year ago

I think the issue is from Emacs editorconfig. I've opened an PR in https://github.com/editorconfig/editorconfig-emacs/pull/300 to resolve this issue.

jcs090218 commented 1 year ago

@oeN Now the https://github.com/editorconfig/editorconfig-emacs/pull/300 PR has merged, can you download the latest version and try to see if it works?