2017-02-19 18:57:16 -05:00
|
|
|
;;; module-csharp.el
|
2015-06-15 09:06:10 +02:00
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(def-package! csharp-mode
|
2015-06-15 09:06:10 +02:00
|
|
|
:mode "\\.cs$"
|
2016-03-29 23:13:31 -04:00
|
|
|
:init (add-hook 'csharp-mode-hook 'flycheck-mode))
|
2015-06-15 09:06:10 +02:00
|
|
|
|
2015-10-08 01:48:47 -04:00
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(def-package! omnisharp
|
2017-02-19 18:57:16 -05:00
|
|
|
:commands omnisharp-mode
|
2016-03-29 23:13:31 -04:00
|
|
|
:preface
|
|
|
|
(setq omnisharp-auto-complete-want-documentation nil
|
2017-02-19 18:57:16 -05:00
|
|
|
omnisharp-server-executable-path (concat doom-local-dir "OmniSharp.exe"))
|
2016-03-27 00:46:52 -04:00
|
|
|
:when (file-exists-p omnisharp-server-executable-path)
|
2017-02-19 18:57:16 -05:00
|
|
|
:init
|
2017-02-23 00:06:12 -05:00
|
|
|
(add-hook! csharp-mode '(eldoc-mode omnisharp-mode))
|
2015-10-08 01:48:47 -04:00
|
|
|
:config
|
2017-02-23 00:06:12 -05:00
|
|
|
(set! :company-backend 'csharp-mode '(company-omnisharp))
|
2015-06-15 09:06:10 +02:00
|
|
|
|
2015-10-28 17:27:56 -04:00
|
|
|
;; Map all refactor commands (see emr)
|
2017-02-23 00:06:12 -05:00
|
|
|
(map! :map omnisharp-mode-map
|
2017-02-28 12:11:18 -05:00
|
|
|
:m "gd" 'omnisharp-go-to-definition
|
|
|
|
|
|
|
|
(:localleader
|
|
|
|
:n "b" 'omnisharp-recompile
|
|
|
|
|
|
|
|
(:prefix "r"
|
|
|
|
:n "i" 'omnisharp-fix-code-issue-at-point
|
|
|
|
:n "u" 'omnisharp-fix-usings
|
|
|
|
:n "r" 'omnisharp-rename
|
|
|
|
:n "a" 'omnisharp-show-last-auto-complete-result
|
|
|
|
:n "o" 'omnisharp-show-overloads-at-point)
|
|
|
|
|
|
|
|
(:prefix "f"
|
|
|
|
:n "u" 'omnisharp-find-usages
|
|
|
|
:n "i" 'omnisharp-find-implementations
|
|
|
|
:n "f" 'omnisharp-navigate-to-current-file-member
|
|
|
|
:n "m" 'omnisharp-navigate-to-solution-member
|
|
|
|
:n "M" 'omnisharp-navigate-to-solution-file-then-file-member
|
|
|
|
:n "F" 'omnisharp-navigate-to-solution-file
|
|
|
|
:n "r" 'omnisharp-navigate-to-region
|
|
|
|
:n "ti" 'omnisharp-current-type-information
|
|
|
|
:n "td" 'omnisharp-current-type-documentation)
|
|
|
|
|
|
|
|
(:prefix "t"
|
|
|
|
:n "r" (λ! (omnisharp-unit-test "fixture"))
|
|
|
|
:n "s" (λ! (omnisharp-unit-test "single"))
|
|
|
|
:n "a" (λ! (omnisharp-unit-test "all"))))))
|
2017-02-19 18:57:16 -05:00
|
|
|
|
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(def-package! shader-mode :mode "\\.shader$") ; unity shaders
|
2017-02-19 18:57:16 -05:00
|
|
|
|