Merge branch 'develop' of https://github.com/hlissner/doom-emacs into develop
This commit is contained in:
commit
4ba8379312
8 changed files with 102 additions and 3 deletions
|
@ -84,6 +84,7 @@
|
|||
ledger ; an accounting system in Emacs
|
||||
lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
nim ; python + lisp at the speed of c
|
||||
nix ; I hereby declare "nix geht mehr!"
|
||||
ocaml ; an objective camel
|
||||
(org ; organize your plain life in plain text
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
;;; completion/ivy/doctor.el -*- lexical-binding: t; -*-
|
||||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; completion/ivy/doctor.el
|
||||
|
||||
(when (and (not EMACS26+) (featurep! +childframe))
|
||||
(error! "The +childframe feature requires Emacs 26+"))
|
||||
|
|
|
@ -129,7 +129,6 @@ compilation database is present in the project.")
|
|||
|
||||
|
||||
(def-package! irony
|
||||
:after cc-mode
|
||||
:commands (irony-install-server irony-mode)
|
||||
:preface
|
||||
(setq irony-server-install-prefix (concat doom-etc-dir "irony-server/"))
|
||||
|
@ -145,7 +144,6 @@ compilation database is present in the project.")
|
|||
(add-hook 'irony-mode-hook #'+cc|irony-init-compile-options))
|
||||
|
||||
(def-package! irony-eldoc
|
||||
:after irony
|
||||
:hook (irony-mode . irony-eldoc))
|
||||
|
||||
(def-package! flycheck-irony
|
||||
|
|
47
modules/lang/nim/README.org
Normal file
47
modules/lang/nim/README.org
Normal file
|
@ -0,0 +1,47 @@
|
|||
#+TITLE: :lang Nim
|
||||
|
||||
#+begin_quote
|
||||
This module is a work in progress.
|
||||
#+end_quote
|
||||
|
||||
This module adds [[https://nim-lang.org][Nim]] support to Emacs.
|
||||
|
||||
+ Code completion (nimsuggest + company)
|
||||
+ Syntax checking (nimsuggest + flycheck)
|
||||
+ Babel support (~ob-nim~)
|
||||
|
||||
* Table of Contents :TOC:
|
||||
- [[Module Flags][Module Flags]]
|
||||
- [[Prerequisites][Prerequisites]]
|
||||
- [[Nim][Nim]]
|
||||
- [[Configuration][Configuration]]
|
||||
|
||||
* Module Flags
|
||||
This module provides no flags.
|
||||
|
||||
* Prerequisites
|
||||
+ ~nim~ (for building & evaluation)
|
||||
+ ~nimsuggest~ (for code completion, syntax checking & jump-to-definition functionality)
|
||||
|
||||
** Nim
|
||||
=choosenim= is an installer and version manager for the Nim programming
|
||||
language. You can install the latest stable release of Nim by running the
|
||||
following in your terminal and following the onscreen instructions:
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
|
||||
#+END_SRC
|
||||
|
||||
Alternatively, nim is usually available through your OS's package manager:
|
||||
|
||||
*** MacOS
|
||||
#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes")
|
||||
brew install nim
|
||||
#+END_SRC
|
||||
|
||||
*** Arch Linux
|
||||
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
|
||||
sudo pacman --needed --noconfirm -S nim nimble
|
||||
#+END_SRC
|
||||
|
||||
* Configuration
|
32
modules/lang/nim/config.el
Normal file
32
modules/lang/nim/config.el
Normal file
|
@ -0,0 +1,32 @@
|
|||
;;; lang/nim/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(def-package! nim-mode
|
||||
:mode "\\.nim\\'"
|
||||
:mode ("\\.nim\\(ble\\|s\\)\\'" . nimscript-mode)
|
||||
:config
|
||||
(load "nim-mode-autoloads" nil t)
|
||||
;; NOTE nim-mode autoloads sets up xref
|
||||
|
||||
(defun +nim|init-nimsuggest-mode ()
|
||||
"Conditionally load `nimsuggest-mode', instead of clumsily erroring out if
|
||||
nimsuggest isn't installed."
|
||||
(when (executable-find "nimsuggest")
|
||||
(nimsuggest-mode)))
|
||||
(add-hook 'nim-mode-hook #'+nim|init-nimsuggest-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"))
|
||||
|
||||
|
||||
(def-package! flycheck-nim
|
||||
:when (featurep! :feature syntax-checker)
|
||||
:after nim-mode
|
||||
:config
|
||||
(add-hook 'nimsuggest-mode-hook #'flycheck-mode))
|
||||
|
9
modules/lang/nim/doctor.el
Normal file
9
modules/lang/nim/doctor.el
Normal file
|
@ -0,0 +1,9 @@
|
|||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; lang/nim/doctor.el
|
||||
|
||||
(unless (executable-find "nimsuggest")
|
||||
(warn! "Could not find nimsuggest executable; code-completion, syntax checking and jump-to-definition functionality will be disabled."))
|
||||
|
||||
(unless (executable-find "nim")
|
||||
(warn! "Could not find nim executable; build commands will be disabled."))
|
||||
|
9
modules/lang/nim/packages.el
Normal file
9
modules/lang/nim/packages.el
Normal file
|
@ -0,0 +1,9 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/nim/packages.el
|
||||
|
||||
;;; requires nim nimsuggest nimble
|
||||
|
||||
(package! nim-mode)
|
||||
|
||||
(when (featurep! :feature syntax-checker)
|
||||
(package! flycheck-nim))
|
|
@ -18,6 +18,8 @@
|
|||
(package! ob-sql-mode)
|
||||
(package! ob-translate)
|
||||
|
||||
(when (featurep! :lang nim)
|
||||
(package! ob-nim))
|
||||
(when (featurep! :lang crystal)
|
||||
(package! ob-crystal))
|
||||
(when (featurep! :lang go)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue