TemaDeveloper / TemaDeveloper/personal_planner

feat(notes): more code-block languages (Go, Dockerfile, …) via custom Shiki highlighter

Open
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
2
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Code blocks syntax-highlight via @blocknote/code-block's bundled Shiki languages (~50, incl. JS/TS/Python/Rust/Java/etc.) and auto-detect the language (detectLanguage in src/lib/notes/detect-language.ts, guarded to SUPPORTED_LANGUAGES).

Go is not in the bundled set, so it's intentionally not detected (would assign an unhighlightable id). To support Go and other extras (Dockerfile, Perl, …) we'd pass a custom createHighlighter to createCodeBlockSpec that registers the additional precompiled grammars, then extend SUPPORTED_LANGUAGES + detectLanguage.

Files: src/components/notes/notes-editor.tsx (schema codeBlock spec), src/lib/notes/detect-language.ts.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/components/notes/notes-editor.tsx at the schema codeBlock spec, then read src/lib/notes/detect-language.ts and its SUPPORTED_LANGUAGES guard. Set up the custom createHighlighter path with the additional precompiled grammars, extend language detection, and verify that Go and other requested languages such as Dockerfile and Perl receive highlightable language IDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.