Created
January 4, 2019 15:21
-
-
Save ShigekiKarita/47f804d1447beeed7b1c624b5f5c42dc to your computer and use it in GitHub Desktop.
my dlang setting in emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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