Closed ParisLiakos closed 8 years ago
Can you report this to Geany please? I think that Geany resets some sort of settings after pressing <Enter>
after a curly brace. Maybe there is another extension to do this for curly braces?
Not exactly sure what to report to Geany. Maybe you can help me find where Geany misbehaves, then i can open a ticket to Geany core, so they fix it? I did some more research now:
The same happens when i disable all of my addons, so its something in Geany core that causes this. Then i found this https://github.com/geany/geany/blob/master/src/editor.c#L1296
Could it be that insert_indent_after_line()
is going around editorconfig somehow?
I went to #geany
irc channel and asked. Some very helpful people pointed me to the correct direction:
The plugin should not only talk to scintilla but should also set Geany's settings. This way, geany and every other plugin would play nicely with editorconfig.
Thanks for your info. I'll look into the Geany API again to fix this.
I believe that
scintilla_send_message(sci, SCI_SETINDENT, (uptr_t)ecConf.indent_size, 0);
should be changed to
editor_set_indent_width(gd->editor, ecConf.indent_size);
That should update both fields in GeanyEditor and in Scintilla widget.
@i-rinat Thanks! Should now be fixed in 9dce3bb476728a8f4124aefe12e0a4ffc8567dff
Thank you both! It seems to work properly now
By the way, @ParisLiakos, which Geany version do you use?
I now have 1.27. And it seems, the plugin doesn't work with it. I ended up changing it to another API to make it load.
@i-rinat Can you give more details? It works well on 1.24.1.
i am on 1.27 too..the one in debian's repos and it works perfectly as far as i can see.
@xuhdev, I tried again and now it works. I wonder what I did wrong the first time.
Sorry, that was false alarm.
When creating a new block of code with
{}
pressing<enter>
after the open bracket, Geany uses the global indentation settings instead of those in .editorconfig.