enable 8-threaded make in r mode

This commit is contained in:
ndwarshuis 2019-04-30 11:36:53 -04:00
parent b6f74658d3
commit 7c70a0cc3f
1 changed files with 14 additions and 2 deletions

View File

@ -663,7 +663,6 @@ Flycheck syntax checkers
(use-package ess
:straight t
:init
;; (load "ess-site")
(require 'ess-r-mode)
:hook
((ess-mode . flycheck-mode)
@ -677,9 +676,22 @@ Flycheck syntax checkers
(inferior-ess-mode . nd/init-ess-company)
(inferior-ess-mode . prettify-symbols-mode))
:config
(setq inferior-R-args "--quiet --no-save"
(setq inferior-R-program "R"
inferior-R-args "--quiet --no-save"
ess-history-file "session.Rhistory"
ess-history-directory (substitute-in-file-name "${XDG_CONFIG_HOME}/r/")))
;; fast compile
(defun nd/ess-r-add-env (orig-fun inf-buf proc-name start-args)
(let ((process-environment (cons "MAKEFLAGS=-j8" process-environment)))
(funcall orig-fun inf-buf proc-name start-args)))
(defun nd/ess-r-start-env (orig-fun &rest args)
(nd/with-advice
((#'inferior-ess--start-process :around #'nd/ess-r-add-env))
(apply orig-fun args)))
(advice-add #'run-ess-r :around #'nd/ess-r-start-env)
#+END_SRC
*** Python
Flycheck syntax checkers to install (either globally or using =pip=)