From 86fd2b48c096856dfe0f7e9c86d5a0aad09a48f9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 1 Oct 2015 13:49:36 -0400 Subject: [PATCH] v0.2.0 bump; better c# support --- init.el | 6 +++--- modules/module-csharp.el | 33 ++++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/init.el b/init.el index 626837b1a..48f03c842 100644 --- a/init.el +++ b/init.el @@ -2,7 +2,7 @@ ;; ;; Author: Henrik Lissner ;; URL: https://github.com/hlissner/emacs.d -;; Version: 0.1.0 +;; Version: 0.2.0 ;; ;;; Are you pondering what I'm pondering, Pinky? ;; @@ -75,10 +75,10 @@ module-cc ; c/c++/obj-c madness ;; module-crystal ; ruby at the speed of c - ;; module-csharp ; unity, mono and xamarin + module-csharp ; unity, .NET, and mono shenanigans module-data ; dbs 'n data formats module-elisp ; drowning in parentheses - module-eshell ; eshell (on windows) + ;; module-eshell ; eshell (on windows) module-go ; a hipster dialect module-java ; the poster child for carpal tunnel syndome module-js ; alert("not java, javascript!") diff --git a/modules/module-csharp.el b/modules/module-csharp.el index 8b4ef2b18..b2e4372d5 100644 --- a/modules/module-csharp.el +++ b/modules/module-csharp.el @@ -7,20 +7,43 @@ (use-package omnisharp :after csharp-mode - :init (add-hook! csharp-mode 'omnisharp-mode) + :init (add-hook! csharp-mode '(emr-initialize omnisharp-mode)) :config (setq omnisharp-server-executable-path - "~/Dropbox/lib/Omnisharp/server/OmniSharp/bin/Debug/OmniSharp.exe" + "~/Dropbox/lib/omnisharp-server/OmniSharp/bin/Debug/OmniSharp.exe" omnisharp-auto-complete-want-documentation nil) (bind! :map omnisharp-mode-map :n "gd" 'omnisharp-go-to-definition - :n "\\u" 'omnisharp-find-usages - :n "\\i" 'omnisharp-find-implementations) + (:prefix "," + :n "tr" (λ (omnisharp-unit-test "fixture")) + :n "ts" (λ (omnisharp-unit-test "single")) + :n "ta" (λ (omnisharp-unit-test "all")))) (after! company (add-company-backend! csharp-mode (omnisharp)) - (add-hook! csharp-mode 'turn-on-eldoc-mode))) + (add-hook! csharp-mode 'turn-on-eldoc-mode)) + + (mapc (lambda (x) + (let ((command-name (car x)) + (title (cadr x))) + (emr-declare-command (intern (format "omnisharp-%s" (symbol-name command-name))) + :title title :modes 'omnisharp-mode))) + '((find-usages "find usages") + (find-implementations "find implementations") + (fix-code-issue-at-point "fix code issue at point") + (fix-usings "fix usings") + (rename "rename") + (current-type-information "current type information") + (current-type-documentation "current type documentation") + (navigate-to-current-file-member "navigate to current file member") + (navigate-to-solution-member "navigate to solution member") + (navigate-to-solution-file-then-file-member "navigate to solution file then member") + (navigate-to-solution-file "navigate to solution file") + (navigate-to-region "navigate to region") + (show-last-auto-complete-result "last auto complete result") + (show-overloads-at-point "show overloads at point") + (recompile "recompile")))) ;; unity shaders (use-package shaderlab-mode :mode "\\.shader$")