[Github-comments] [geany/geany] Julia support (#434)

elextr notifications at xxxxx
Sat Sep 12 00:33:04 UTC 2020


@getzze the ctags parser is used for the symbol pane and passing typenames to the lexer, as well as completions.

But yes the Julia syntax is not context sensitive (unlike say C) and you can recognise and highlight :: and other type operators in the lexer (along with all the myriad of operators Julia allows as your point 5 says).  Also of course you can also highlight all the keywords like "primitive type abstract struct" etc and do folding on them.

Whilst you _could_ highlight identifiers that are recognised as typenames in a file, I wouldn't recommend it since the lexer has no way to know about typenames from outside the file (from modules etc) so only local typenames would be highlighted and that would not be very helpful (IMHO, Julia editor without `Array` highlighted would be sacrilege :grin:).  

What most of the lexers do is accept lists of identifiers to highlight differently to the default identifiers, a feature that was meant to allow for additional keywords, but which Geany (ab)uses to identify types that the ctags parsers recognise, and in some languages to highlight differently the "built-in" types.  

You could use a static list of builtins and standard library in `filetypes.Julia` until your parser is working and you can make a tags file for standard library stuff to be loaded when the first Julia file is loaded (as is done for Python and C and others).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/434#issuecomment-691365199
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20200911/86f26c00/attachment-0001.htm>


More information about the Github-comments mailing list