All Projects → Waqar144 → QSourceHighlite

Waqar144 / QSourceHighlite

Licence: MIT license
Lightweight syntax highlighter written in Qt

Programming Languages

C++
36643 projects - #6 most used programming language
QMake
1090 projects

Projects that are alternatives of or similar to QSourceHighlite

gamestudio
2D game engine and editor
Stars: ✭ 207 (+430.77%)
Mutual labels:  qt5, qt5-gui, qt5-applications
pardus-store
Pardus Application Store
Stars: ✭ 32 (-17.95%)
Mutual labels:  qt5, qt5-gui, qt5-applications
Highlight.js
JavaScript syntax highlighter with language auto-detection and zero dependencies.
Stars: ✭ 19,312 (+49417.95%)
Mutual labels:  syntax-highlighting, syntax-highlighter
ProductManagementTool
Advanced Product tracking automation system using Qt 5 and C++
Stars: ✭ 39 (+0%)
Mutual labels:  qt5, qt5-gui
PiHueEntertainment
An application that can handle the Hue Entertainment Areas on a Raspberry Pi
Stars: ✭ 28 (-28.21%)
Mutual labels:  qt5, qt5-gui
syntax highlighter
Syntax Highlighter for Dart/Flutter Code
Stars: ✭ 28 (-28.21%)
Mutual labels:  syntax-highlighting, syntax-highlighter
JKQtExtras
a collection of different Qt4 & Qt5 widgets, I developed over the years
Stars: ✭ 34 (-12.82%)
Mutual labels:  qt5, qt5-gui
vatsinator-legacy
An open-source Vatsim monitor
Stars: ✭ 12 (-69.23%)
Mutual labels:  qt5, qt5-gui
QTextRecognizer
A gui for tesseractOCR with some preprocessing image options (OpenCV) for improve character recognition
Stars: ✭ 27 (-30.77%)
Mutual labels:  qt5, qt5-gui
PremiereSubtitle
🎬Premiere subtitles generator | Pr 字幕批量生成器
Stars: ✭ 21 (-46.15%)
Mutual labels:  qt5, qt5-applications
uDevkit-IDE
An IDE for uDevkit or C/C++ projects with Git written in Qt5
Stars: ✭ 15 (-61.54%)
Mutual labels:  syntax-highlighting, qt5
ModBuddy
Mod buddy is a mod manager created with extensibility in mind
Stars: ✭ 30 (-23.08%)
Mutual labels:  qt5
DrawingBoard
NJU_Graphics_Homework / 计算机图形学课程大作业
Stars: ✭ 37 (-5.13%)
Mutual labels:  qt5
JCEditor
📝 Text editor created in Java
Stars: ✭ 33 (-15.38%)
Mutual labels:  syntax-highlighting
ManDrake
Native Mac man page editor with syntax coloring, mandoc syntax checking & live preview.
Stars: ✭ 130 (+233.33%)
Mutual labels:  syntax-highlighting
idasix
IDAPython compatibility library. idasix aims to create a smooth ida development process and allow a single codebase to function with multiple IDA/IDAPython versions
Stars: ✭ 24 (-38.46%)
Mutual labels:  qt5
vim-vgo
Vim syntax highlighting for golang.org/x/vgo go.mod
Stars: ✭ 28 (-28.21%)
Mutual labels:  syntax-highlighting
erk
Ərk is an open source, cross-platform IRC client written in Python 3, Qt 5, and Twisted.
Stars: ✭ 21 (-46.15%)
Mutual labels:  qt5
wavebin
∿ Oscilloscope waveform capture viewer and converter.
Stars: ✭ 31 (-20.51%)
Mutual labels:  qt5
Clojure-Sublimed
Clojure support for Sublime Text 4
Stars: ✭ 268 (+587.18%)
Mutual labels:  syntax-highlighting

Background

It started as an internal component of 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.

It 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.

Screenshot

Cpp

Usage

Add the .pri file to your project. Then initialize it like this:

highlighter = new QSourceHighliter(plainTextEdit->document());
highlighter->setCurrentLanguage(QSourceHighlighter::CodeCpp);

Themes

Currently 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.

Supported Languages

Currently the following languages are supported (more being added):

  • Bash script
  • C
  • C++
  • C#
  • CMake
  • CSS
  • Go
  • Html
  • INI
  • Java
  • Javascript
  • JSON
  • Make
  • PHP
  • Python
  • QML
  • Rust
  • SQL
  • Typescript
  • V lang
  • XML
  • YAML
  • Houdini Vex

Adding more languages

If 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.

Dependencies

It has no dependency except Qt ofcourse. It should work with any Qt version > 5 but if it fails please create an issue.

Building

Load the project into Qt Creator and click run.

LICENSE

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].