> For Scintilla, there's also a useful tutorial (using a language as obscure as Julia 😉) that explains how to implement a lexer. It used to be linked from Scintilla's main documentation page but it 404's here. I found it hosted elsewhere:
>
> https://www.coursehero.com/file/45607974/Scintilla-varaq-Tutorialpdf/
Is there another host for the tutorial @codebrainz suggested? I can only see the first 3 pages without registering.
@elextr I am considering giving a try at writing a Julia lexer, but I can't foresee my time availability at the moment. I have no prior knowledge of lexers/parsers, so I would like to start looking at the reference material at the very least.
--
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-690323556
@abianco88 are you volunteering to start writing the Lexer? Feel free to post a link to your github repository where its happening so others can assist you.
Now that Julia is (somewhat) settled syntax the Lexer should be possible, but it will do nothing with types, the lexers are called lexers because they only recognise syntactic elements, they have no knowledge of semantics such as types and type annotations, thats the purpose of the uctags parsers. This keeps lexers light and fast so they can be run as you type while parsers are heavier and do more work and generally run less often. Highlighting of typenames in languages that support it is provided by the uctags typename list results being transferred to the lexer by Geany as if they were keywords.
I'm not sure how good a static Julia parser would be, certainly it could recognise function definitions (although one liners might still be a challenge) but for a dynamic, heavily inferred language like Julia its not going to do much else. Also there is the issue that Unicode is not well supported by uctags and there might be issues there.
--
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-689914548
Therefore, besides updating the proposed custom filetype to Julia 1.5 and possibly improving it, there is still a real need to write a Scintilla lexer and a uctags parser (I assume this would address the issues with type annotations and symbols). I totally agree that the documentation is too obscure, at least to someone who isn't used to work on those things like myself, that's exactly why it would be great if we could get some help/guidance from Geany/Scintilla contributors to make it happen.
I have no idea how many Julia users are out there, but I just can't believe they all use either Atom/Juno or VS Code! OK, I admit I know at least one that uses Brackets, but still it would be much better if Geany were among the options...
--
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-689831261
> If that's the case, besides being over 5 years old, what are the issues with the custom filetype proposed above by @peter1000? Generally, what's needed to make a good Julia filetype file?
I'm using it everyday and probably I got used to it but I see 3 big issues that require writing a Scintilla lexer specially for Julia:
- using splatting "..." of varargs makes the end of the line being recognized as comment and lose coloration.
- the "end" keyword sometimes doesn't match the beginning of the block (for, if, function...), I don't know if it's because you can use it for indexing also, but the code collapsing function is not working at all because of that.
- complex strings with interpolation is not correctly parsed, making all the line losing color and even sometimes the next lines.
Also minor problems are:
- symbols are not recognized as special type (like strings) so it is not easy to find them in the code.
- type annotations with ::, <: are not emphasized
- macros are not colored either
I tried to work on the Scintilla lexer but the documentation is too obscure.
--
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-689809782
I still find it shocking that Geany supports so many programming languages but Julia has not been considered for so many years. I am not complaining. It is just a shocking fact to me.
--
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-689809688
If some expert from Geany were to provide some guidance and help, we could give it a try.
Not sure if it's a good idea, but would it be possible to start with what has been done for Atom and/or VS Code? One other difficulty I haven't mentioned earlier is to collect all keywords from Julia base and possibly common packages.
--
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-689803216
To be honest, I am not an expert on such things. I think it should not be very difficult to add basic Julia support to Geany.
--
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-689764612
That was exactly my line of thought: VSCode is nice and sleek, but it's too heavy even with just the Julia extension loaded. If we could get Geany to work with Julia, we would (finally) get a lightweight editor. Would it be possible to raise enough interest to put together someone willing to support this?
--
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-689720199