From 80970dfa472fbe97ff66a0f51108ac2cb1e620ff Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 16 Jul 2019 08:30:12 -0700 Subject: [PATCH] Enable omnisharp for csharp-mode --- oni-csharp.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/oni-csharp.el b/oni-csharp.el index de5db3a..c954175 100644 --- a/oni-csharp.el +++ b/oni-csharp.el @@ -4,7 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 20190409014124 +;; Version: 20190711082233 +;; Package-Requires: (csharp-mode omnisharp oni-company oni-flycheck) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -75,5 +76,16 @@ (overlay-put current-overlay 'oni-csharp--overlayp t) (overlay-put current-overlay 'evaporate t))))) +(with-eval-after-load 'company + (add-to-list 'company-backends 'company-omnisharp)) + +(add-hook 'csharp-mode-hook 'company-mode) +(add-hook 'csharp-mode-hook 'electric-indent-local-mode) +(add-hook 'csharp-mode-hook 'electric-pair-local-mode) +(add-hook 'csharp-mode-hook 'flycheck-mode) +(add-hook 'csharp-mode-hook 'omnisharp-mode) + +;;;###autoload(with-eval-after-load 'csharp-mode (require 'oni-csharp)) + (provide 'oni-csharp) ;;; oni-csharp.el ends here