Skip to content

Customization for Jupyter notebook #4097

@unknwon

Description

@unknwon

Currently, syntax highlight is hard-coded for Python, and could cause problem when using notebook for other languages.

Since all languages' notebook is using file extension .ipynb, it is impossible to set highlight language based on it. We could let highlightJS dynamically decide itself, but it is considered unreliable.

Thus, to have a repo-based customization/configuration for notebook is needed, allow repository owner to decide which language to highlighted as.

Here is the basic proposal:

Based on the fact we already uses .gogs directory for issue/pull request templates, we can add another file ipynb.ini or ipynb.json (format to be determined, but prefer .ini like .editorconfig).

Basic options (with examples )are:

  • language: go: define overall language
  • {file}: bash (define language to individual file)

These options can co-exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🧙 proposalLet's bring more ideas together

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions