2015-07-24 11:16:06 +00:00
|
|
|
(setq nim-packages
|
|
|
|
'(company
|
|
|
|
flycheck
|
2015-10-21 18:27:48 +00:00
|
|
|
flycheck-nim
|
2015-07-24 11:16:06 +00:00
|
|
|
nim-mode))
|
|
|
|
|
2015-10-11 03:19:23 +00:00
|
|
|
(defun nim/post-init-company ()
|
2017-01-02 05:39:04 +00:00
|
|
|
(spacemacs|add-company-backends
|
|
|
|
:backends company-capf
|
|
|
|
:modes nim-mode nimscript-mode))
|
2015-10-11 03:19:23 +00:00
|
|
|
|
|
|
|
(defun nim/post-init-flycheck ()
|
2017-02-14 03:27:29 +00:00
|
|
|
(spacemacs/enable-flycheck 'nim-mode))
|
2015-10-11 03:19:23 +00:00
|
|
|
|
|
|
|
(defun nim/init-flycheck-nim ()
|
|
|
|
(use-package flycheck-nim
|
2017-07-02 13:48:06 +00:00
|
|
|
:if (configuration-layer/package-used-p 'flycheck)))
|
2015-10-11 03:19:23 +00:00
|
|
|
|
2015-07-24 11:16:06 +00:00
|
|
|
(defun nim/init-nim-mode ()
|
|
|
|
(use-package nim-mode
|
|
|
|
:defer t
|
2016-09-15 11:04:48 +00:00
|
|
|
:init
|
2016-10-17 12:00:15 +00:00
|
|
|
(progn
|
|
|
|
(add-hook 'nim-mode-hook 'nimsuggest-mode)
|
|
|
|
(push 'nimsuggest-find-definition spacemacs-jump-handlers-nim-mode))
|
2015-07-24 11:16:06 +00:00
|
|
|
:config
|
|
|
|
(progn
|
|
|
|
(defun spacemacs/nim-compile-run ()
|
|
|
|
(interactive)
|
|
|
|
(shell-command "nim compile --run main.nim"))
|
2016-09-15 11:04:48 +00:00
|
|
|
|
2015-11-18 00:38:05 +00:00
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'nim-mode
|
2016-09-15 11:04:48 +00:00
|
|
|
"cr" 'spacemacs/nim-compile-run
|
|
|
|
"gb" 'pop-tag-mark))))
|