66b3a0ba01
Naming the main file `main.nim` is a `C` convention, not a `Nim` convention. In fact, `Nimble` defaults to naming the main file after the project at initialization. I will soon add a function that parses the Nimble configuration for project entry point and compiles that. Until then, this is a solid compromise between flexibility and reliability. I also added a doc-string to the function. |
||
---|---|---|
.. | ||
img | ||
config.el | ||
packages.el | ||
README.org |
Nim layer
Description
This layer adds support for the multi-paradigm language Nim
.
Features:
- Code completion.
- Jump to definition.
- Syntax checking.
Install
To use this configuration layer, add it to your ~/.spacemacs
. You will need to
add nim
to the existing dotspacemacs-configuration-layers
list in this
file.
For syntax checking, the syntax-checking
layer must also be added.
For all the features to work properly, nimsuggest
must be installed properly
and nimsuggest
binary must be in $PATH.
Working with Nim
Nim commands (start with m
):
Key binding | Description |
---|---|
SPC m c r |
nim compile --run main.nim |
SPC m g g or M-. |
Jump to definition |
SPC m g b or M-, |
Jump back |
SPC m h h |
Show symbol’s documentation |