https://bugs.kde.org/show_bug.cgi?id=414997

            Bug ID: 414997
           Summary: Custom user syntax highlighting file does not override
                    system syntax highlighting file
           Product: kate
           Version: 19.08.3
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: syntax
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: prusselltechgr...@gmail.com
  Target Milestone: ---

SUMMARY

Cannot override a system KDE Kate syntax highlighting file located at
/usr/share/org.kde.syntax-highlighting/syntax/ with a user defined KDE Kate
syntax highlighting file installed at
$HOME/.local/share/org.kde.syntax-highlighting/syntax/ per KDE KatePart
documentation.

The KDE KatePart documentation is located here:
https://docs.kde.org/trunk5/en/applications/katepart/highlight.html

The pertinent text is:
-------------
The formal definition, also known as the XSD you find in Syntax Highlighting
repository in the file language.xsd

Custom .xml highlight definition files are located in
org.kde.syntax-highlighting/syntax/ in your user folder found with
qtpaths--paths GenericDataLocation which usually is $HOME/.local/share
-------------

STEPS TO REPRODUCE
1. Create a valid custom asciidoc.xml file
2. Copy to $HOME/.local/share/org.kde.syntax-highlighting/syntax/asciidoc.xml
3. Start kate
4. Review menu paths: Tools > Highlighting > Markup and Tools > Highlighting >
Other
5. Rename /usr/share/org.kde.syntax-highlighting/syntax/asciidoc.xml
6. Repeat steps 3 and 4

OBSERVED RESULT
A user custom xml file exists at
$HOME/.local/share/org.kde.syntax-highlighting/syntax/asciidoc.xml

When the system xml file exists at
/usr/share/org.kde.syntax-highlighting/syntax/asciidoc.xml, the KDE Kate menu
appears:

Tools > Highlighting > Markup > AsciiDoc
Tools > Highlighting > Other > not there

When the system xml file does not exist at
/usr/share/org.kde.syntax-highlighting/syntax/asciidoc.xml, the KDE Kate menu
appears:

Tools > Highlighting > Markup > not there
Tools > Highlighting > Other > AsciiDoc

NOTE: 

The user custom syntax highlighting/code folding file for asciidoc has a
language element with these attributes:

-------------
<language name="AsciiDoc" section="Other"
          version="2" kateversion="3.7"
          extensions="*.asciidoc;*.txt;" mimetype=""
          priority="10"
-------------

EXPECTED RESULT

When both a system and user custom KDE Kate syntax highlighting exist, the user
custom KDE Kate syntax highlighting file should override, or priority should be
obeyed.

In this particular case, the KDE Kate menu should appear:

Tools > Highlighting > Markup > not there
Tools > Highlighting > Other > AsciiDoc

A custom user xml file should override the system xml.

SOFTWARE/OS VERSIONS

KDE Plasma Version: 5.17.3
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2
KATE: 19.08.3

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to