YAML: only comments after spaces and other improvements/fixes

Authored by nibags on May 31 2019, 11:05 AM.

Description

YAML: only comments after spaces and other improvements/fixes

Summary:
BUG: 407060
FIXED-IN: 5.59.0

Improvements and corrections to YAML.

Changes:

  • Only highlight comments after spaces.
  • Add folding indentation, like the Python highlighter.
  • Avoid highlighting lists, hashes and strings within blocks with multiple lines, incorrectly.
  • Highlight two points of Keys in another color, to make it easier to differentiate Keys and attributes in some color schemes.
  • Changes in colors:
    • The Keys are now in bold, helps to differentiate Keys and attributes, especially in the Solarized schemes.
    • Data types are highlighted with dsOthers, to differentiate from the Attribute color.
    • "Normal Text" is now dsAttribute, to unify the colors of attributes, since in attributes with multiple lines the colors are inconsistent. This is done according to other text editors such as VSCode and Atom, where the same color is used for attributes and normal text.

Solarized scheme:

Normal block & literal block:

Reviewers: dhaumann, cullmann, Framework: Syntax Highlighting

Reviewed By: dhaumann, cullmann, Framework: Syntax Highlighting

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: Kate, Frameworks

Differential Revision: https://phabricator.kde.org/D21411