TemaDeveloper / TemaDeveloper/personal_planner
feat(notes): more code-block languages (Go, Dockerfile, …) via custom Shiki highlighter
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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