Open pa-0 opened 1 month ago
The main questions that come to mind are:
Edit:
Edit2:
Valid points.
The main questions that come to mind are:
Does it build with qmake and CMake? Cmake: definitely - qmake: I'll take a look at the logs and find out.
Does it also build on Windows, macOS, FreeBSD, ...? Yes to all 3 (in addiiton to android apparently)
How can all the features of the highlighter of https://github.com/pbek/qmarkdowntextedit/ and the quirks added by QOwnNotes be integrated? Kate's implementation could be revealing, at least for the editor implementation. After work today, I will see if I can find any qt-based apps that have implemented it in markdown preview pane - though I believe kate has an extension that does that as well. It couldn't hurt to review the source of those apps at least as a starting point to get some idea of best approach. As far as quirks, that will also require a follow-up.
Should it be integrated into https://github.com/pbek/qmarkdowntextedit/ (which would be a major external dependency) or QOwnNotes directly (which also would be a major external dependency)?
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?
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). Everything that is specific to QOwnNotes goes into QOwnNotes.
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
cmake
primarily though I did see some references to qmake
during a very cursory review while on my lunch breakdmg
) / linux (appimage
) /windows (exe
/zip
).gitmodules
for vtextedit:
[submodule "src/libs/syntax-highlighting"]
path = libs/syntax-highlighting
url = https://github.com/vnotex/syntax-highlighting.git
[submodule "src/libs/hunspell"]
path = libs/hunspell
url = https://github.com/vnotex/hunspell.git
[submodule "src/libs/sonnet"]
path = libs/sonnet
url = https://github.com/vnotex/sonnet.git
...
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.
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.
Yes, he is pretty awesome! 😉
Another big blocker would be that KSyntaxHighlighting doesn't support Qt5 at all.
Ah, I didn't even think about that on my list!
Ahh
Another big blocker would be that KSyntaxHighlighting doesn't support Qt5 at all.
Ah, I didn't even think about that on my list!
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.[^1]:
KSyntaxHighlighter
's README.md