nim: move local packages to local folder and simplify config
This commit is contained in:
parent
56ecd43753
commit
6edfdb550e
|
@ -1,11 +0,0 @@
|
||||||
(setq nim-pre-extensions
|
|
||||||
'())
|
|
||||||
|
|
||||||
(setq nim-post-extensions
|
|
||||||
;; taken from https://github.com/ALSchwalm/flycheck-nim
|
|
||||||
'(flycheck-nim))
|
|
||||||
|
|
||||||
(defun nim/init-flycheck-nim ()
|
|
||||||
(spacemacs/add-flycheck-hook 'nim-mode)
|
|
||||||
(use-package flycheck-nim
|
|
||||||
:if (configuration-layer/layer-usedp 'syntax-checking)))
|
|
|
@ -1,26 +1,29 @@
|
||||||
(setq nim-packages
|
(setq nim-packages
|
||||||
'(company
|
'(company
|
||||||
|
company-nim
|
||||||
flycheck
|
flycheck
|
||||||
|
(flycheck-nim :location local)
|
||||||
nim-mode))
|
nim-mode))
|
||||||
|
|
||||||
|
(defun nim/post-init-company ()
|
||||||
|
(spacemacs|add-company-hook nim-mode))
|
||||||
|
|
||||||
|
(defun nim/post-init-flycheck ()
|
||||||
|
(spacemacs/add-flycheck-hook 'nim-mode))
|
||||||
|
|
||||||
|
(defun nim/init-flycheck-nim ()
|
||||||
|
(use-package flycheck-nim
|
||||||
|
:if (configuration-layer/package-usedp 'flycheck)))
|
||||||
|
|
||||||
(defun nim/init-nim-mode ()
|
(defun nim/init-nim-mode ()
|
||||||
(use-package nim-mode
|
(use-package nim-mode
|
||||||
:defer t
|
:defer t
|
||||||
|
:init (when (configuration-layer/package-usedp 'company)
|
||||||
|
(push 'company-nim company-backends-nim-mode))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(defun spacemacs/nim-compile-run ()
|
(defun spacemacs/nim-compile-run ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(shell-command "nim compile --run main.nim"))
|
(shell-command "nim compile --run main.nim"))
|
||||||
|
|
||||||
(evil-leader/set-key-for-mode 'nim-mode
|
(evil-leader/set-key-for-mode 'nim-mode
|
||||||
"mcr" 'spacemacs/nim-compile-run))))
|
"mcr" 'spacemacs/nim-compile-run))))
|
||||||
|
|
||||||
(when (configuration-layer/layer-usedp 'auto-completion)
|
|
||||||
(defun nim/post-init-company ()
|
|
||||||
(spacemacs|add-company-hook nim-mode))
|
|
||||||
|
|
||||||
(defun nim/init-company-nim ()
|
|
||||||
(use-package company-nim
|
|
||||||
:defer t
|
|
||||||
:init
|
|
||||||
(push 'company-nim company-backends-nim-mode))))
|
|
||||||
|
|
Loading…
Reference in a new issue