[Discussion] future of syntax highlighting #1180
Labels
No Label
⌚ Major-release
⌚ Minor-release
⚔️ Wontfix
⚙️ CI
⛏️ Breaking
✨ Duplicate
❌ Invalid
❓ Question
❤️ Support
➡️ Frontport
➡️ Needs-frontport
🔙 Backport
💭 Brainstorming
🐛 Bug
🔭 Cannot-reproduce
🧺 Cleanup
🧾 Confirmed
💬 Discussion
📄 Documentation
🎯 Enhancement
🩹 External-dependecy
📱 F-droid
🎉 Feature
👋 Good-first-issue
🤾 Google-play
🔙 Has-backport
🚀 Improvement
🚨 Investigate
🌠 Long-term
🔙 Needs-backport
🧺 Needs-cleanup
📡 Needs-feedback
📈 Performance
📌 Priority-critical
📌 Priority-high
📍 Priority-low
📍 Priority-medium
🥑 Ready
🪒 Refactor
🔙 Regression
📸 Release
🔒 Security
💡 Suggestion
🧪 Testing
🌐 Translation
💻 UI/UX
🪜 Upstream
🟦 Website
🙇♂️ Needs-help
🛰️ API-dependency
🛡️ Blocked
🏗️ Build
🗒️ Changelog
🗄️ Repository
🗓️ Summary
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitnex/GitNex#1180
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We're currently using my Prism4j fork for syntax highlighting. Unfortunately, this will be incompatible with the CodeView (#1166), and @mmarif already added some languages (Go, Python and Python). The main issue is that we shouldn't duplicate the languages. If we switch to CodeView, we should drop Prism4j. I could (try to) migrate the MD syntax highlighter and the file viewer to the language definitions of the CodeView. But three languages are not enough. We should add some more languages, maybe not everything supported by Prism4j, but the most important languages. I'll list some languages I'd say that are necessary to replace Prism4j:
Done
Extending languages
Probably, we can look at Prism4j's definitions here that are helpful (they are very detailed).
We should also check that the highlighting quality is comparable to the current one.
Do you have more languages to add here?
Otherwise, we should try to implement them step by step.
We can also look at https://github.com/kbiakov/CodeView-Android/tree/master/codeview/src/main/java/io/github/kbiakov/codeview/highlight/prettify/lang and https://github.com/massivemadness/Squircle-IDE/tree/master/languages for some language definitions.