2018-05-08 11:50:12 -03:00
|
|
|
#+TITLE: :lang Nim
|
|
|
|
|
|
|
|
#+begin_quote
|
|
|
|
This module is a work in progress.
|
|
|
|
#+end_quote
|
|
|
|
|
|
|
|
This module adds [[https://nim-lang.org][Nim]] support to Emacs.
|
|
|
|
|
2018-05-09 10:20:29 +02:00
|
|
|
+ Code completion (nimsuggest + company)
|
|
|
|
+ Syntax checking (nimsuggest + flycheck)
|
2018-05-08 11:50:12 -03:00
|
|
|
+ Babel support (~ob-nim~)
|
|
|
|
|
|
|
|
* Table of Contents :TOC:
|
2018-05-09 10:20:29 +02:00
|
|
|
- [[Module Flags][Module Flags]]
|
|
|
|
- [[Prerequisites][Prerequisites]]
|
2018-05-08 11:50:12 -03:00
|
|
|
- [[Nim][Nim]]
|
2018-05-09 10:20:29 +02:00
|
|
|
- [[Configuration][Configuration]]
|
|
|
|
|
|
|
|
* Module Flags
|
|
|
|
This module provides no flags.
|
|
|
|
|
|
|
|
* Prerequisites
|
|
|
|
+ ~nim~ (for building & evaluation)
|
|
|
|
+ ~nimsuggest~ (for code completion, syntax checking & jump-to-definition functionality)
|
2018-05-08 11:50:12 -03:00
|
|
|
|
|
|
|
** Nim
|
2018-05-09 10:20:29 +02:00
|
|
|
=choosenim= is an installer and version manager for the Nim programming
|
|
|
|
language. You can install the latest stable release of Nim by running the
|
|
|
|
following in your terminal and following the onscreen instructions:
|
2018-05-08 11:50:12 -03:00
|
|
|
|
2018-05-09 10:20:29 +02:00
|
|
|
#+BEGIN_SRC bash
|
|
|
|
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
|
|
|
|
#+END_SRC
|
2018-05-08 11:50:12 -03:00
|
|
|
|
2018-05-09 10:20:29 +02:00
|
|
|
Alternatively, nim is usually available through your OS's package manager:
|
2018-05-08 11:50:12 -03:00
|
|
|
|
|
|
|
*** MacOS
|
|
|
|
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
|
|
|
|
brew install nim
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
*** Arch Linux
|
|
|
|
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
|
2018-05-09 10:20:29 +02:00
|
|
|
sudo pacman --needed --noconfirm -S nim nimble
|
2018-05-08 11:50:12 -03:00
|
|
|
#+END_SRC
|
|
|
|
|
2018-05-09 10:20:29 +02:00
|
|
|
* Configuration
|