2017-02-19 18:57:16 -05:00
|
|
|
;;; module-csharp.el
|
2015-06-15 09:06:10 +02:00
|
|
|
|
2017-02-19 18:57:16 -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-19 18:57:16 -05:00
|
|
|
(@def-package omnisharp
|
|
|
|
: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
|
|
|
|
(@add-hook csharp-mode '(eldoc-mode omnisharp-mode))
|
2015-10-08 01:48:47 -04:00
|
|
|
:config
|
2017-02-19 18:57:16 -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-19 18:57:16 -05:00
|
|
|
(@map :map omnisharp-mode-map
|
|
|
|
:n "gd" 'omnisharp-go-to-definition
|
|
|
|
|
|
|
|
:localleader
|
|
|
|
:n "b" 'omnisharp-recompile
|
|
|
|
|
|
|
|
:prefix "r"
|
|
|
|
:n "fu" 'omnisharp-find-usages
|
|
|
|
:n "fi" 'omnisharp-find-implementations
|
|
|
|
:n "i" 'omnisharp-fix-code-issue-at-point
|
|
|
|
:n "u" 'omnisharp-fix-usings
|
|
|
|
:n "r" 'omnisharp-rename
|
|
|
|
:n "ti" 'omnisharp-current-type-information
|
|
|
|
:n "td" 'omnisharp-current-type-documentation
|
|
|
|
:n "gf" 'omnisharp-navigate-to-current-file-member
|
|
|
|
:n "gm" 'omnisharp-navigate-to-solution-member
|
|
|
|
:n "gM" 'omnisharp-navigate-to-solution-file-then-file-member
|
|
|
|
:n "gF" 'omnisharp-navigate-to-solution-file
|
|
|
|
:n "gr" 'omnisharp-navigate-to-region
|
|
|
|
:n "a" 'omnisharp-show-last-auto-complete-result
|
|
|
|
:n "o" 'omnisharp-show-overloads-at-point
|
|
|
|
|
|
|
|
:prefix "t"
|
|
|
|
:n "tr" (@λ (omnisharp-unit-test "fixture"))
|
|
|
|
:n "ts" (@λ (omnisharp-unit-test "single"))
|
|
|
|
:n "ta" (@λ (omnisharp-unit-test "all"))))
|
|
|
|
|
|
|
|
|
|
|
|
(@def-package shader-mode :mode "\\.shader$") ; unity shaders
|
|
|
|
|