-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] KSyntaxHighlighting #3078
Comments
The main questions that come to mind are:
Edit:
Edit2:
|
Valid points.
What has been the approach up until now for enhancements / new features? Have you been pushing major changes there first and then integrating into QownNotes that way? |
Everything that is for general use goes into qmarkdowntextedit (that's why I extracted it as a component from the get-go). And of course I forgot one other point:
|
Still at work, but FYI just came across this so it might be informative/educational at least vnote implements KSyntaxHighlighter:
|
Hah, nice. 😉 Btw. @Waqar144, surely has opinions, since he works on kate. |
I know! When I was researching yesterday, I noticed a shoutout/thank you to him. From what I read on the homepage for kate, I got the distinct impression that they were able to port it to qt6 thanks to him. Pretty awesome how much he contributes to the community. |
It is possible but it will be a lot of work. Firstly KSyntaxHighlighting doesnot support qmake so that will need to be figured out first. Also, KSyntaxHighlighting themes are much bigger than the ones in QOwnNotes (which is essentially 5 colors). So QOwnNotes will need to somehow extend its UI to allow modifying those themes. Integerating KSH in the code would be simple I think. Alternatively, QOwnNotes can be extended so that it takes a list of keywords from a file which allow the users to add more languages without having to modify the code. |
Another big blocker would be that KSyntaxHighlighting doesn't support Qt5 at all. |
Yes, he is pretty awesome! 😉 |
Ah, I didn't even think about that on my list! |
Ahh
AHH, ok. I don't doubt that, @Waqar144, you are the expert here given your involvement on kate. I missed that lack of compatibility when looking at the repo -- Actually, my assumption was that, even if the current build of the syntax highlighting engine doesn't support qt5, the commit history / issues seem to indicate that the syntax highlighting engine has been used in kate for a few years now (before the port to qt6) so getting qt5 compatibility was just a matter of using an earlier release of the engine. Regardless, taking a step back, what are your personal views on syntax highlighting? In other words, does your vision for the future of QownNotes include syntax highlighting for several languages? many languages? Is it something you care about / would like to see? If the answer is yes, I think that's something to consider. If its really not at all important to either of you, then maybe best to leave it be for now (at least until some easier approach to implementation is developed or found in the future)? Personally, I think the user-defined keywords @Waqar144 mentioned sounds like a good solution. |
This issue is stale because it has been open for 30 days with no activity. |
Is your feature request related to a problem? Please describe.
As far as I know, currently
QownNotes
syntax highlighting support is hard-coded and not extensible (albeit supporting more than just a few languages). Still, I see a few issues/requests for syntax highlighting support for other languages...So, I have been thinking about possible solutions or workarounds. This is less of a feature request, and more an attempt to pick the maintainers' brains and get the general temperature of the room:
Describe the solution you'd like
What are your thoughts on KSyntaxHighlighter?
❝
... a stand-alone implementation of the cross-platform Kate editor syntax highlighting engine. It's meant as a building block for text editors as well as for simple highlighted text rendering (e.g. as HTML), supporting both integration with a custom editor as well as a ready-to-use
QSyntaxHighlighter
sub-class.1❞
KSyntaxHighlighter
overviewFeatureful:
Natively supports syntax highlighting for 300+ already defined syntaxes...!!.
Easy integration with apps built on QT framework:
Both
C++
andQML
API's are already exposed / providedActively maintained:
As a standalone (separate from Kate editor) library here
User-Customizable and Extensible:
XML
format and stored in user's home/profile directory so new language support can be added simply by dropping new definition files in that same folder.JSON
format.Footnotes
KSyntaxHighlighter
's README.md ↩The text was updated successfully, but these errors were encountered: