Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use additional syntax files?
Forum Updated to NodeBB v4.3 + New Features

How to use additional syntax files?

Scheduled Pinned Locked Moved Solved General and Desktop
1 Posts 1 Posters 110 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AndrzejB
    wrote on last edited by AndrzejB
    #1

    In https://kate-editor.org/syntax/data/syntax/ (or https://invent.kde.org/frameworks/syntax-highlighting/-/tree/master/data/syntax) is 362 xml files, but I notice that very known Antlr g4 format is not in this set.

    I interested in Antlr and want add xml for it.
    How can editor based on QPlainTextEdit and using syntax from KF5/KSyntaxHighlighting or even Kate or KWriter use additional syntax definitions in xml files?
    How to contribute to https://invent.kde.org with my syntax file?

    =======

    Solution:
    put to (share)/org.kde.syntax-highlighting/syntax my file

    m_repository.addCustomSearchPath(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/org.kde.syntax-highlighting/syntax"));
    m_repository.reload();
    

    contribution: fork and pull request

    1 Reply Last reply
    0
    • A AndrzejB has marked this topic as solved on

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved