Feature Request: Scripting hooks for adding language support and stylsheets to code highlighting.

オープン
#1,527 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
22/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp

調査の方向性

This is an open-ended request for new scripting hooks, not a localized fix. Start from the existing custom-stylesheet hook in the scripting docs and the highlighting path around src/entities/note.cpp (the linked line). Decide how language definitions (JSON/regex) and per-language stylesheets would plug into that pipeline. Done means documented, testable hooks that let a script add a language and its colors without core changes; expect design and maintainer buy-in first.

索引モデルが issue の本文から書いたものです。

説明

Importance: Low Type: Improvement

I understand that code highlighting is early in it's making right now, but here's a preliminary feature request.

In a similar vein to the hook for adding a custom stylesheet it would be a good idea to have a hooks for adding both:

  1. Support for languages;
    Perhaps a JSON file or similar, with explicitly typed keywords, types, 'other's, the start and end of a comment, etc.
    Bonus points if it support regex so that people can basically copy the regex from highligh.js for the slightly more convoluted languages.

  2. Custom language highlighting stylsheets; Extra bonus points for being able to define which code the specific sheet applies to, so that you can have, for example, Java keywords highlighted in one set of colors, but C++ in another.

Would make your job a lot easier if people just added the languages they need themselves as there are billions of them (and I wanna add taggerscript which is always going to be way too low on the priority list). Perhaps you can then assimilate the scripts into the base program or so with an eventual update, if necessary.

主要言語
C++
スター
5.9k
フォーク
499
平均マージ
4時間 4分
マージ済み PR(30日)
3

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pbek/QOwnNotes のほかの issue

pbek/QOwnNotes の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。