Not sure whether this is a Geany or Scintilla issue: would it be possible to implement auto-indent for Matlab, based in keywords (if .. end, etc.). As I understand it, auto-indent is currently based only on open/close braces.
The current autoindent is not really language specific, its based solely on braces, and language only comes into it for skipping braces in comments and strings and other non-code places when finding the open brace to match the close brace indent to. It does not understand the languages beyond that.
Adding a language specific indentation based on the keywords and constructs of that language is something considerably more complex and should not be built into Geany, but be part of a plugin for the language. Unfortunately at the moment it would be difficult to interface such a plugin to Geany though might be possible if somebody was clever enough :)
Pull requests are welcome.
Thanks very much for the information, elextr. I doubt I'd be up to the job of writing a suitable plugin, unfortunately.
On 13 January 2017 at 12:38, elextr notifications@github.com wrote:
The current autoindent is not really language specific, its based solely on braces, and language only comes into it for skipping braces in comments and strings and other non-code places when finding the open brace to match the close brace indent to. It does not understand the languages beyond that.
Adding a language specific indentation based on the keywords and constructs of that language is something considerably more complex and should not be built into Geany, but be part of a plugin for the language. Unfortunately at the moment it would be difficult to interface such a plugin to Geany though might be possible if somebody was clever enough :)
Pull requests are welcome.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
github-comments@lists.geany.org