Cudatext: Julia lexer, some comments

Created on 24 Jan 2021  路  8Comments  路  Source: Alexey-T/CudaText

Following our short discussion, I'm reposting here:

I just tried opening a Julia project, here are some quick comments (I could make those in your repo if you preferred):

Screenshot 2021-01-24 at 17 32 16

--> ideally the :name should be highlighted as strings, the const keyword should be highlighted too as well as function indicators (like LittleDict) though that last one matters less. Also the nothing, false, etc keywords

Screenshot 2021-01-24 at 17 33 35

--> keywords like function, if, end, etc should be highlighted, functions should ideally be highlighted, modules (e.g. Base. and Core. should too + missing keyword

Screenshot 2021-01-24 at 17 34 54

--> text between """ should be highlighted as string, #= ... =# indicates a multi-line comments

I could give you more detailed feedback on this at the main repo if that's useful?

Note: I think the most up to date description of the syntax is in highlights.js (https://github.com/highlightjs/highlight.js/blob/master/src/languages/julia.js)

_Originally posted by @tlienart in https://github.com/tlienart/LiveServer.jl/issues/113#issuecomment-766390706_

lexer

All 8 comments

Thanks. lexer was updated now.

  • what is the full word list of "classes" to highlight? is it in the julia.js file?
  • words 'true', 'false', 'nothing' are hilited already! so you have the 'pale font' which is not looking ok...

please check it again?
Screenshot from 2021-01-24 20-21-54

that looks great! and I understand for the font, I'll adjust, thanks!

I just updated it (update in Plugins/ Addon Manager/ update).
so that julia.js keywords are all used now.
I was not sure how to highlight these words from this line

{
      className: 'keyword',
      begin:
        '\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b'
    },

this shows words: abstract, primitive, type, mutable, struct. how to highlight them?

the same way:

Screenshot 2021-01-24 at 18 55 05

that was added, lexer updated. I leave the issue opened for few days (maybe you 'll comment).

@tlienart It will be good if you annouce that lexer for Cud was reworked. i made lot of changes today. I mean at https://discourse.julialang.org/t/is-anyone-using-textadept-as-their-editor-of-choice-for-julia/41255/1

done :-)

thanks; closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alexey-T picture Alexey-T  路  5Comments

jczanfona picture jczanfona  路  5Comments

Alexey-T picture Alexey-T  路  5Comments

Alexey-T picture Alexey-T  路  7Comments

JairoMartinezA picture JairoMartinezA  路  5Comments