diff --git a/ext/Makefile b/ext/Makefile new file mode 100644 index 000000000..cf5400f42 --- /dev/null +++ b/ext/Makefile @@ -0,0 +1,18 @@ + +all: rust csharp + +rust: + echo "Installing Rust dependencies" + git clone --depth 1 --recursive https://github.com/rust-lang/rust.git rust + git clone --depth 1 --recursive https://github.com/phildawes/racer.git racer-src + cd racer-src && cargo build --release + mv racer-src/target/release/racer ./racer + rm -rf racer-src + +csharp: + echo "Installing C# dependencies" + git clone --depth 1 --recursive https://github.com/OmniSharp/omnisharp-server omnisharp + cd omnisharp && xbuild + mv omnisharp/bin/Debug/OmniSharp.exe ./OmniSharp.exe + rm -rf omnisharp + diff --git a/modules/module-csharp.el b/modules/module-csharp.el index 7e38311cb..06dec5156 100644 --- a/modules/module-csharp.el +++ b/modules/module-csharp.el @@ -9,12 +9,12 @@ ;; unity shaders (use-package shader-mode :mode "\\.shader$") +(setq omnisharp-auto-complete-want-documentation nil + omnisharp-server-executable-path (concat narf-ext-dir "/OmniSharp.exe")) + (use-package omnisharp :defer t - :preface - (setq omnisharp-server-executable-path "~/Dropbox/lib/omnisharp-server/OmniSharp/bin/Debug/OmniSharp.exe" - omnisharp-auto-complete-want-documentation nil) - :if (file-exists-p omnisharp-server-executable-path) + :when (file-exists-p omnisharp-server-executable-path) :init (add-hook! csharp-mode '(emr-initialize omnisharp-mode)) :config diff --git a/modules/module-rust.el b/modules/module-rust.el index e72dbb10c..202691d52 100644 --- a/modules/module-rust.el +++ b/modules/module-rust.el @@ -10,10 +10,10 @@ :config (add-hook! rust-mode 'flycheck-mode)) (use-package racer - :when (file-exists-p "/usr/local/bin/racer") + :when (file-exists-p (concat narf-ext-dir "/racer")) :config - (setq racer-cmd "/usr/local/bin/racer" - racer-rust-src-path "~/Dropbox/lib/rust/src/") + (setq racer-cmd (concat narf-ext-dir "/racer") + racer-rust-src-path (concat narf-ext-dir "/rust/src/")) (map! :map rust-mode-map :m "gd" 'racer-find-definition) ;; TODO Unit test keybinds