After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755817 - Auto indentation, in HTML & C, doesn't respect current settings.
Auto indentation, in HTML & C, doesn't respect current settings.
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: preferences
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
: 770442 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-09-29 22:29 UTC by Diogo Campos
Modified: 2016-08-31 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Diogo Campos 2015-09-29 22:29:50 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
Comment 1 Álvaro Peña 2015-10-19 18:37:19 UTC
Here same bug editing C, Fedora 23 and Builder 3.19 from git.
Comment 2 Hugo Klepsch 2015-11-14 01:41:10 UTC
I also have this problem while editing C. 
Arch linux 4.3.5-1-ARCH 3.18.1 from official repos.
Comment 3 Tobias Schönberg 2015-11-26 13:58:30 UTC
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.
Comment 4 Christian Hergert 2015-11-27 21:13:39 UTC
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.
Comment 5 sébastien lafargue 2016-08-26 14:52:30 UTC
*** Bug 770442 has been marked as a duplicate of this bug. ***
Comment 6 Nathaniel McCallum 2016-08-26 14:58:19 UTC
.editorconfig doesn't work for me.

Here is an example where it doesn't work: https://github.com/latchset/tang
Comment 7 Christian Hergert 2016-08-31 20:03:49 UTC
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).
Comment 8 Nathaniel McCallum 2016-08-31 20:31:47 UTC
Works for me!
Comment 9 Christian Hergert 2016-08-31 20:33:30 UTC
Cool. I'm going to close this bug, even though we still intend to write a new indenter engine.