diff --git a/.emacs.d/config.org b/.emacs.d/config.org index 8e6318d..1ea9583 100644 --- a/.emacs.d/config.org +++ b/.emacs.d/config.org @@ -452,7 +452,9 @@ When using emacs on MacOS, the environment variables are not synced properly and #+begin_src emacs-lisp (use-package exec-path-from-shell - :config (exec-path-from-shell-initialize)) + :config + (when (memq window-system '(mac ns x)) + (exec-path-from-shell-initialize))) #+end_src * Builtin Package Config diff --git a/.emacs.d/lsp.org b/.emacs.d/lsp.org index b31d492..57f98ce 100644 --- a/.emacs.d/lsp.org +++ b/.emacs.d/lsp.org @@ -129,7 +129,12 @@ Install ~ccls~ with homebrew using the following command. #+begin_src emacs-lisp (use-package rustic :defer t - :hook (rust-mode . lsp-deferred)) + :hook (rust-mode . lsp-deferred) + :init + (let ((brew-prefix (string-trim (shell-command-to-string "brew --prefix")))) + (when (and (memq window-system '(mac ns x)) brew-prefix (f-directory-p brew-prefix)) + (setenv "YARA_LIBRARY_PATH" (expand-file-name "lib" brew-prefix)) + (setenv "YARA_INCLUDE_DIR" (expand-file-name "include" brew-prefix))))) #+end_src ** C#