Created
April 27, 2015 11:27
-
-
Save kurogomapurin/42386006f9aaa7187840 to your computer and use it in GitHub Desktop.
Unity C# on Emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t) | |
(setq auto-mode-alist | |
(append '(("\\.cs$" . csharp-mode)) auto-mode-alist)) | |
(defun my-csharp-mode-fn () | |
(turn-on-auto-revert-mode) | |
(setq indent-tabs-mode nil) | |
) | |
(add-hook 'csharp-mode-hook 'my-csharp-mode-fn t) | |
(eval-after-load 'company | |
'(add-to-list 'company-backends 'company-omnisharp)) | |
(require 'csharp-mode) | |
(add-hook 'csharp-mode-hook | |
'(lambda() | |
(setq comment-column 40) | |
(setq c-basic-offset 4) | |
(omnisharp-mode) | |
(company-mode) | |
(Flycheck-Mode) | |
) | |
) | |
(require 'omnisharp) | |
(setq omnisharp-server-executable-path (expand-file-name "~/OmniSharpserver/OmniSharp/bin/debug/OmniSharp.exe")) | |
(eval-after-load 'company | |
'(progn | |
(define-key company-active-map (kbd "\c-n") 'company-select-next) | |
(define-key company-active-map [control n] 'company-select-next) | |
(define-key company-active-map (kbd "\c-p") 'company-select-previous) | |
(define-key company-active-map [control p] 'company-select-previous) | |
) | |
) | |
(eval-after-load 'company | |
'(add-to-list 'company-backends 'company-omnisharp) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment