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$"
|
2017-04-17 02:17:10 -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-04-17 02:17:10 -04: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
|
|
|
|
2017-02-23 00:06:12 -05:00
|
|
|
(map! :map omnisharp-mode-map
|
2017-04-17 02:17:10 -04:00
|
|
|
:m "gd" #'omnisharp-go-to-definition
|
2017-02-28 12:11:18 -05:00
|
|
|
|
|
|
|
(:localleader
|
2017-04-17 02:17:10 -04:00
|
|
|
:n "b" #'omnisharp-recompile
|
2017-02-28 12:11:18 -05:00
|
|
|
|
|
|
|
(:prefix "r"
|
2017-04-17 02:17:10 -04:00
|
|
|
: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)
|
2017-02-28 12:11:18 -05:00
|
|
|
|
|
|
|
(:prefix "f"
|
2017-04-17 02:17:10 -04:00
|
|
|
: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)
|
2017-02-28 12:11:18 -05:00
|
|
|
|
|
|
|
(: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
|
|
|
|