[Geany-Users] Custom lexer and automatic indent

Lex Trotman elextr at xxxxx
Wed Dec 21 01:53:46 UTC 2016


On 19 December 2016 at 23:44, Fardet Tanguy <fardet.tanguy at laposte.net> wrote:
> Dear all,
>
> now that the segfault problem is out of the way, I am still struggling with
> one point regarding the custom lexer I created: the auto-ident behaviour.
>
> The syntax of NESTML is very similar to that of Python (you can see a
> screenshot here) so I would like to make Geany increase the indent after a
> column, and decrease it again after the keyword "end".
>
> Because I thought it would be related, I managed to declare the folding
> procedure to recognize the column/end blocks; however, the indent still is
> not increased.
> Similarly, I found a get_python_indent method in src/editor.c with a comment
> saying /* add extra indentation for Python after colon */, but adding a
> condition to also recognize SCE_NESTML_OPERATOR did not solve the problem
> (and I can't find where this function is called anyway).
>
> Could you tell me where auto-indent instructions are declared in Geany? Or
> is it something missing with the lexer?

Its nothing to do with the lexer.  Sadly someone in the past made the
lousy decision to hard code it, so there is no way to change it other
than changing the hard coding.

>
> Best,
> Tanguy
>
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>


More information about the Users mailing list