{"id":33071295,"url":"https://github.com/Waqar144/QSourceHighlite","last_synced_at":"2025-11-19T03:02:19.447Z","repository":{"id":43202640,"uuid":"230216969","full_name":"Waqar144/QSourceHighlite","owner":"Waqar144","description":"Lightweight syntax highlighter written in Qt","archived":false,"fork":false,"pushed_at":"2025-01-15T05:54:18.000Z","size":522,"stargazers_count":81,"open_issues_count":0,"forks_count":20,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T07:38:42.415Z","etag":null,"topics":["cplusplus","cpp","cxx","parser","qt","qt-libraries","qt-libs","qt5","qt5-applications","qt5-gui","syntax-highlighter","syntax-highlighting"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Waqar144.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-26T07:27:44.000Z","updated_at":"2025-01-15T05:54:20.000Z","dependencies_parsed_at":"2025-01-15T06:49:10.503Z","dependency_job_id":"7eb9ae8d-7d45-4c11-afbe-c70a010bc29c","html_url":"https://github.com/Waqar144/QSourceHighlite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Waqar144/QSourceHighlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waqar144%2FQSourceHighlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waqar144%2FQSourceHighlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waqar144%2FQSourceHighlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waqar144%2FQSourceHighlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Waqar144","download_url":"https://codeload.github.com/Waqar144/QSourceHighlite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waqar144%2FQSourceHighlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285175517,"owners_count":27127379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-19T02:00:05.673Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cplusplus","cpp","cxx","parser","qt","qt-libraries","qt-libs","qt5","qt5-applications","qt5-gui","syntax-highlighter","syntax-highlighting"],"created_at":"2025-11-14T09:00:30.482Z","updated_at":"2025-11-19T03:02:19.443Z","avatar_url":"https://github.com/Waqar144.png","language":"C++","readme":"# Background\n\nIt started as an internal component of [qmarkdowntextedit](https://github.com/pbek/qmarkdowntextedit) to provide syntax highlighting(kind of like **highlight.js**). Ithttps://github.com/pbek/qmarkdowntextedit is currently being used in QOwnNotes and you can test it there or run the demo here.\n\nIt doesn't use any regex because I want it to be fast. It can currently load a 100,000 lines of source code in ~0.4 seconds on my 4th Gen Intel Core i5 4300U.\n\n# Screenshot\n\n![Cpp](screenshot/syntax.png)\n\n# Usage\n\nAdd the `.pri` file to your project. Then initialize it like this:\n```cpp\nhighlighter = new QSourceHighliter(plainTextEdit-\u003edocument());\nhighlighter-\u003esetCurrentLanguage(QSourceHighlighter::CodeCpp);\n```\n\n# Themes\n\nCurrently there is only one theme 'Monokai' apart from the one that is created during highlighter initialization. More themes will be added soon. You can add more themes in QSourceHighlighterThemes.\n\n## Supported Languages\n\nCurrently the following languages are supported (more being added):\n- Bash script\n- C\n- C++\n- C#\n- CMake\n- CSS\n- Go\n- Html\n- INI\n- Java\n- Javascript\n- JSON\n- Make\n- PHP\n- Python\n- QML\n- Rhai\n- Rust\n- SQL\n- Typescript\n- V lang\n- XML\n- YAML\n- Houdini Vex\n\n## Adding more languages\n\nIf you want to add a language, collect the language data like keywords and types and add it to the `languagedata.h` file. For some languages it may not work, so create an issue and I will write a separate parser for that language.\n\n## Dependencies\n\nIt has no dependency except Qt ofcourse. It should work with any Qt version \u003e 5 but if it fails please create an issue.\n\n## Building\n\nLoad the project into Qt Creator and click run.\n\n## LICENSE\n\nMIT License\n\n","funding_links":[],"categories":["Misc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWaqar144%2FQSourceHighlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWaqar144%2FQSourceHighlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWaqar144%2FQSourceHighlite/lists"}