-
Notifications
You must be signed in to change notification settings - Fork 4
Start D with Emacs
tom tan edited this page Jul 8, 2013
·
10 revisions
DMD is a reference implementation of D compiler. You can get it from dlang.org.
If you do not install DMD in PATH
, add the following line to your .emacs
(please modify "/path/to/dmd" to fit your environment).
(add-to-list 'exec-path (expand-file-name "/path/to/dmd"))
Add the following lines to your .emacs
.
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
You can install it by using M-x package-install d-mode
.
flycheck-d
depends on flycheck.el
.
You can install it by using M-x package-install flycheck
.
Install flycheck-d.el
You can install it by using M-x package-install flycheck-d
and add the following line to your .emacs
.
(require 'flycheck-d)
For your convenience, add the following lines to your .emacs
.
(add-hook 'd-mode-hook
(lambda ()
(local-set-key (kbd "C-c C-p") 'flycheck-previous-error)
(local-set-key (kbd "C-c C-n") 'flycheck-next-error))
Have fun!
You can see the error lines highlighted in D source code.
You can use C-c C-p
and C-c C-n
to go to previous and next errors, respectively.