XhmikosR / notepad2-mod

LOOKING FOR DEVELOPERS - Notepad2-mod, a Notepad2 fork, a fast and light-weight Notepad-like text editor with syntax highlighting
https://xhmikosr.github.io/notepad2-mod/
Other
1.45k stars 270 forks source link

add YAML lexer #34

Closed costin closed 11 years ago

costin commented 11 years ago

Adding YAML lexer to Notepad2 (for issue #33). This is an initial draft - compiles fine on my end and can edit various yaml files (code folding is also available which is quite nice).

Not sure about the style though - I might change it and use the one from wikipedia. Suggestions welcome.

Cheers

XhmikosR commented 11 years ago

Thanks, I'll have a closer look tomorrow and let you know.

XhmikosR commented 11 years ago

After looking at your patch, everything seems fine apart from the following:

  1. The default colors you chose aren't very nice IMHO. Perhaps you could follow Scite's scheme more?
  2. You should use the existent IDs when possible and not use the same IDs for different strings. Examples:
    • "Keyword" is already available as 63128
    • 63309 shouldn't be used in "Reference" since it's used in "Variable dereferencing", etc. Also try not to skip numbers in the IDs.

Other than the above, the Readme files (and the website) need updating to include the new lexer and we can merge this.

costin commented 11 years ago
  1. Applied the Scite's scheme
  2. Fixed this - I've reused the IDs where possible and added new ones (without skipping)
  3. I've updated the Readme.txt/md

Thanks

XhmikosR commented 11 years ago

Readme-mod.txt != Readme.md.... Also please rebase your branch, it doesn't make any sense to have https://github.com/costin/notepad2-mod/commit/43e0bb21c96f002ff9ed5baa357c435365726ee1 and https://github.com/costin/notepad2-mod/commit/48f1cc43ca37fa09c08712e4485e80dbb67c0610.

Thanks for fixing the IDs.

XhmikosR commented 11 years ago

Also, please let me know how you want to be credited.

costin commented 11 years ago

Since the last readme update seems to have caused issues, I simply removed it. As for the credit, I haven't done much - the lexer was already there so it didn't make sense (at least to me) to add my name into the readme.

XhmikosR commented 11 years ago

All right, it's your call. I'll have a last look later today or tomorrow and then merge it.

Can you squash your commits into one?

costin commented 11 years ago

Done.

XhmikosR commented 11 years ago

What do you think about the "Document" style? I generally don't like backgrounds like that.

I was also thinking to use fore:#FF8000 instead of fore:#880000 for "Number" and bold; fore:#0A246A instead of fore:#000088; bold for "Identifier".

If you agree, please make these changes and the PR is ready.

costin commented 11 years ago

I don't have much of a preference regarding the styles - I think they are fine as they are. If you want the style for "Document" to change, let me know to what, otherwise I'll leave it as it is. Feel free to change them. I've changed Number and Identifier and pushed the commit (squashed).

XhmikosR commented 11 years ago

All right, merged it as is and if I think of a different style for "Document" I'll change it later.

Thanks for your contribution.