/ob-nim

Primary LanguageEmacs LispGNU Lesser General Public License v2.1LGPL-2.1

Nim Org Babel Integration

ob-nim adds support for evaluating Org mode source code blocks (C-c C-c inside a code block).

To enable this feature add nim to your babel languages after loading ob-nim:

(org-babel-do-load-languages
  'org-babel-load-languages
  '((emacs-lisp . t) (org . t) (nim . t)  ...))

Extra Org Babel header args

:var

Passing variables and Org tables with :var header args is supported. Org tables are passed as 2D Nim arrays without the :colnames header.

:colnames

With :colnames, Org tables will be of Nim Table type, with the Org table header elements as keys.

:import

You can specify libraries in the header. Example: :import sequtils tables ...

:define

You can define symbols with :define release ssl ...

Examples

See examples.org.

Contributing

Before submitting a PR, it will be useful to ensure that all tests in this repo pass locally. The user will need to have cask installed on their system, and of course nim.

When providing a PR for a bug fix or a new feature, also add related tests to test-ob-nim.el.

To test your changes, run this from the repo root:

make test