From 0fbbdc912404eb020565dae872fc31416f377aa2 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 2 Mar 2020 10:01:58 -0800 Subject: [PATCH] Setup some code navigation for csharp-mode --- oni-csharp.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/oni-csharp.el b/oni-csharp.el index 954ab70..79fcaea 100644 --- a/oni-csharp.el +++ b/oni-csharp.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0229.134806 +;; Version: 2020.0302.095650 ;; Package-Requires: (csharp-mode omnisharp oni-company oni-flycheck) ;; This program is free software; you can redistribute it and/or modify @@ -26,6 +26,8 @@ ;;; Code: +(require 'csharp-mode) + (defvar oni-csharp--projects (make-hash-table :test 'equal)) (defun oni-csharp-collect-project-names () @@ -94,6 +96,9 @@ (add-hook 'csharp-mode-hook 'rainbow-delimiters-mode) (add-hook 'csharp-mode-hook 'smartparens-mode) +(define-key csharp-mode-map (kbd "M-.") 'omnisharp-go-to-definition) +(define-key csharp-mode-map (kbd "M-?") 'omnisharp-find-usages) + ;;;###autoload (add-to-list 'auto-mode-alist '("\\.xaml\\'" . nxml-mode))