add basic support for the nim language

This commit is contained in:
Miguel Santos 2018-05-08 11:50:12 -03:00
parent 9e141cd01b
commit 12e26761e2
5 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,23 @@
;;; lang/nim/config.el -*- lexical-binding: t; -*-
(def-package! nim-mode
:init
(add-hook 'nim-mode-hook #'nimsuggest-mode))
(def-package! flycheck-nim
:when (featurep! :feature syntax-checker)
:after nim-mode
:config
(add-hook 'nimsuggest-mode-hook #'flycheck-mode)
(map! :map nim-mode-map
:localleader
:n "b" #'+nim/build-menu)
(def-menu! +nim/build-menu
"Building commands for `nim-mode' buffers."
'(("Build & run" :exec nim-compile))
:prompt "Build"))
(when (featurep! :completion company)
(add-hook 'nimsuggest-mode-hook #'company-mode))