Skip to content

Instantly share code, notes, and snippets.

@ShigekiKarita
Created January 4, 2019 15:21
Show Gist options
  • Save ShigekiKarita/47f804d1447beeed7b1c624b5f5c42dc to your computer and use it in GitHub Desktop.
Save ShigekiKarita/47f804d1447beeed7b1c624b5f5c42dc to your computer and use it in GitHub Desktop.
my dlang setting in emacs
;; before running emacs
;; $ dub fetch dcd
;; $ dub build dcd --build=release --config=server
;; $ dub build dcd --build=release --config=client
;; M-x package install company-dcd
(add-hook 'd-mode-hook 'company-dcd-mode)
(add-hook 'd-mode-hook 'flycheck-mode)
(add-hook 'd-mode-hook 'flycheck-dmd-dub-set-variables)
(setq dcd-bin
(string-trim
(shell-command-to-string
"dub build dcd --build=release --config=client | awk 'NR==1{print $NF}' ")))
(with-eval-after-load 'd-mode
(custom-set-variables
'(c-basic-offset 4)
'(c-default-style "stroustrup")
'(company-dcd-client-executable
(concat dcd-bin "bin/dcd-client"))
'(company-dcd-server-executable
(concat dcd-bin "bin/dcd-server"))
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment