moe icon indicating copy to clipboard operation
moe copied to clipboard

Enhance Yaml syntax highlighting

Open fox0430 opened this issue 2 years ago • 4 comments

fox0430 avatar Jul 18 '21 21:07 fox0430

@fox0430

As a first enhancement I would like to suggest to also apply the new comment logic introduced in #1533 -- as soon as it is merged.

In the long term, changes similar to #1533 for other language elements should be the next step. That way, the entire parsing logic could be decomposed into small, well-reusable and well-maintainable procedures such that adding new languages would require only their composition in just a few lines of code.

kevinmatthes avatar Nov 19 '22 21:11 kevinmatthes

@fox0430

The YAML highlighting outputs token types for which there is no colouring scheme, yet. Thus, the default colour will be applied. Configuring further colours for those token types should at least challenge the problem.

highlite defines 39 possible types, only for 13 of them are colours configured. This command will show which:

egrep 'gt.' src/moepkg/color.nim | grep Color | grep '  gt.' | cut -d'*' -f1 | cut -d' ' -f3

kevinmatthes avatar Nov 20 '22 14:11 kevinmatthes

@fox0430

I would like to add highlighting for the number types which are not coloured, yet. Is it okay if I would just map the decimal numbers' colour onto them, by default, unless there is a specific setting in the configuration file?

kevinmatthes avatar Dec 06 '22 15:12 kevinmatthes

@kevinmatthes

I would like to add highlighting for the number types which are not coloured, yet. Is it okay if I would just map the decimal numbers' colour onto them, by default, unless there is a specific setting in the configuration file?

Ok. I think that's fine.

fox0430 avatar Dec 06 '22 15:12 fox0430