Skip to content
Highlight markdown code cells in :atom:
JavaScript CSS
Branch: master
Clone or download

Latest commit

Latest commit 1ea0c49 Mar 18, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
styles init Mar 17, 2020
.gitignore init Mar 17, 2020
CHANGELOG.md init Mar 17, 2020
LICENSE.md init Mar 17, 2020
README.md update images Mar 18, 2020
main.js dynamic cell scopes Mar 18, 2020
package.json Prepare v1.0.0 release Mar 18, 2020

README.md

atom markdown-cell-highlight package

A simple :atom: package to highlight code cells in markdown files; this can be useful, for example, when editing Weave files in Juno or using Hydrogen's rich (multi) language document feature, etc.

To install:

λ apm install markdown-cell-highlight

example look

ariake-dark-syntax one-light syntax
ariake-dark-example one-light-example

config

  • markdown-cell-highlight.targetScopes: If specified, this package will highlight code cells with the specified languages scopes. By default (i.e. ["source.embedded"]), it will highlight every code cell even without language scope. E.g.: if you only want to highlight Julia code cells, you can modify this config into ["source.embedded.julia"].
  • markdown-cell-highlight.markdownScopes: Specifies grammar scopes that this package will consider as markdown files and try to highlight code cells. Set to ["text.md", "source.gfm", "source.weave.md", "source.pweave.md"] by default.

custom styling

You can have custom styles (i.e. custom colors, mostly) via your stylesheet:

.atom/styles.less

// style for cell body
.line.markdown-cell-highlight {
  background: @whatever-color-you-want-for-cell-body;
}
// style for cell gutter
.line-number.markdown-cell-highlight {
  background: @whatever-color-you-want-for-cell-gutter;
}

license

This package is under MIT License.

author

  • Shuhei Kadowaki - undergraduate @ kyoto univ. - aviatesk
You can’t perform that action at this time.