An emacs major mode for the Nim programming language.
- Install Nim
- Install
nim-mode.el
via MELPA.
In nim-mode repository, some *.el files depend on nimsuggest (not nim-suggest.el), so if you want to use more integration in Emacs, please visit the link to install nimsuggest.
Brief descriptions for the nimsuggest related files:
- nim-company.el: auto completion feature
- nim-thing-at-point.el: thing-at-point for nim
- nim-eldoc: show information in minibuffer
After you install nimsuggest, you may need following configuration.
(setq nim-nimsuggest-path "path/to/nimsuggest")
Note that above nim-nimsuggest-path
variable is automatically set
result of (executable-find "nimsuggest")
, so if you can get value from
the executable-find
, you might don't need above configuration.
If you use company-mode
then add company-nim
to company-backends
like:
(add-to-list 'company-backends
'(company-nim :with company-nim-builtin))
This feature is automatically turned on if nim-suggest-path
is non-nil.
If you use auto-indent-mode
, you need to add nim-mode to the list of
auto-indent-multiple-indent-modes
:
(add-to-list 'auto-indent-multiple-indent-modes 'nim-mode)
nim-mode refers to comment-style
variable which comment style user
preferred (whether single line or multi line comment) when user invokes
comment-region
or comment-dwim
. See also comment-styles
variable
for available options.