[Geany-Users] Custom lexer and automatic indent

Fardet Tanguy fardet.tanguy at xxxxx
Mon Dec 19 13:44:01 UTC 2016


Dear all,

now that the segfault problem 
<http://lists.geany.org/pipermail/users/2016-December/010159.html> is 
out of the way, I am still struggling with one point regarding the 
custom lexer <https://github.com/Silmathoron/geany> I created: the 
auto-ident behaviour.

The syntax of NESTML is very similar to that of Python (you can see a 
screenshot here 
<https://github.com/nest/nestml/issues/303#issuecomment-267830820>) 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 
<https://github.com/geany/geany/blob/2a2ae728341d12b7cea29b671beb08e441f62d95/src/editor.c#L1414> 
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?

Best,
Tanguy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/users/attachments/20161219/182157d7/attachment.html>


More information about the Users mailing list