GNOME Bugzilla – Bug 755817
Auto indentation, in HTML & C, doesn't respect current settings.
Last modified: 2016-08-31 20:33:30 UTC
When editing HTML, auto indentation is always "2 spaces", even if configured to "4 spaces". Graphically and "org.gnome.builder.editor.language.html tab-width = 4". Builder 3.18.0 Fedora 23
Here same bug editing C, Fedora 23 and Builder 3.19 from git.
I also have this problem while editing C. Arch linux 4.3.5-1-ARCH 3.18.1 from official repos.
I think 3.18.1 does not remember any of the tab-space settings and also ignores the settings that the user can set for each language. This is quite annoying because the user has to input the tab/space and indentation each time after reopening a file. I think this one should go into the top-priority list for a bugfix release for Fedora 23.
One quick fix you can do is to use a .editorconfig in your project, that seems to work relatively well. I've noticed some issues where settings where getting overridden improperly when modelines where used. Giving us a way to reproduce it would help get this fixed. At the moment I'm still full-stream on a branch so wont get to this until after the holidays without a quick reproducer.
*** Bug 770442 has been marked as a duplicate of this bug. ***
.editorconfig doesn't work for me. Here is an example where it doesn't work: https://github.com/latchset/tang
I've updated the C and HTML/XML indenters. Let me know if these fix things for you! In particular, the indentations coming from these indenters were hard coded and ignoring the values coming from the GtkSourceView (which has its own indent-width/tab-width setting).
Works for me!
Cool. I'm going to close this bug, even though we still intend to write a new indenter engine.