intellij-syntax-highlighting icon indicating copy to clipboard operation
intellij-syntax-highlighting copied to clipboard

Missing parts of the syntax highlighting

Open MegaIng opened this issue 5 years ago • 14 comments

Use this issue to mention all parts where syntax-highlighting is wrong/not as wished/missing in the options menu.

MegaIng avatar Jun 20 '19 11:06 MegaIng

Hi, thanks for providing us 'lark' users with jetbrains syntax highlighting! I would like to make a few enhancement suggessions:

  • Use special highlight colors for non-terminal and terminal symbols. lark2

  • Attach *.lark files with a distinctive icon (just like how python files are attached with a python icon). lark

Those 2 would be the first improvements that I would love to see. 🙂

denizetkar avatar Nov 05 '19 22:11 denizetkar

Do you have an idea what kind of symbol could be used? Adding it is not so much work, I am just bad at designing (it would have to be an svg file if you would like to create it as outlined here)

Also, what kind of default colors would you propose for terminal/non-terminal?

MegaIng avatar Nov 05 '19 22:11 MegaIng

I just realized that you can use different highlighting for tokens and rules via Settings->Editor->Color Scheme->Lark.

MegaIng avatar Nov 05 '19 22:11 MegaIng

I just realized that you can use different highlighting for tokens and rules via Settings->Editor->Color Scheme->Lark.

Thank you for this useful information! I think it would be a good idea to mention about such features in the main page.

Do you have an idea what kind of symbol could be used? Adding it is not so much work, I am just bad at designing (it would have to be an svg file if you would like to create it as outlined here)

Also, what kind of default colors would you propose for terminal/non-terminal?

Something like the following could look nice, although it still has a lot of room for improvement: Lark.zip

(NOTE: i used this website for svg icon design)

denizetkar avatar Nov 06 '19 12:11 denizetkar

After looking around a bit, I found a good candidate. @erezsh Do you have the logo/banner of this organization in some other form than a png? (best case .svg file) and would you think this is a good idea (using that as the icon of the plugin, and as the symbol for the files (as file-type))?

MegaIng avatar Nov 06 '19 19:11 MegaIng

The bird on its own could make a nice icon. What dimensions are we talking?

erezsh avatar Nov 07 '19 13:11 erezsh

Here is the information for a plugin icon. Basically: a .svg file, 40x40 px (but it since it is svg it will be scaled up). There should be two versions, one for light backgrounds, one for dark backgrounds)

Here is the information for the file-type icon. Best case again .svg, can also be a .png. 16x16px, again a light/dark version, for each '@2x' scaled versions should exist.

MegaIng avatar Nov 07 '19 14:11 MegaIng

First of all, thank you for this. Amazing effort.

My lark file has this line:

%import common (LETTER, DIGIT, INT, WS, ESCAPED_STRING, FLOAT)

The line gets many errors:

  • each comma inside the parenthesis
  • the space between "common" and "("
  • the closing ")"

I'm new to lark, so maybe I could improve the error line, but this has been working on the project long before I joined.

Thank you again.

naretto avatar Jan 31 '20 01:01 naretto

Yes, that's probably because it's a relatively new syntax.

If anyone decides to add it, I suggest to support the extended syntax:

%import common (a -> b, C -> D, and -> etc)

erezsh avatar Jan 31 '20 07:01 erezsh

@naretto I will try to fix this soon (maybe today, maybe in the next week)

@erezsh Could you try to keep the lark.lark file up-to-date and inform me about any changes via a mention? (Or is there a way to watch an individual file?)

(And what is about the banner icon we talk about in the past?)

MegaIng avatar Feb 01 '20 08:02 MegaIng

@MegaIng Sure, I can do that. Maybe I can just notify everyone in the highlighters group whenever there's a syntax change. I'll get to the icon at some point.

erezsh avatar Feb 01 '20 09:02 erezsh

@erezsh Thanks!

MegaIng avatar Feb 01 '20 09:02 MegaIng

@naretto In the latest commit it should be working. Tell me if you find any bugs. (For acutal bugs, please add a new issue)

MegaIng avatar Feb 01 '20 17:02 MegaIng

just saw this issue, after creating another one. sorry about that. here it is: #4

ornariece avatar Sep 13 '21 15:09 ornariece