diff --git a/oni-csharp.el b/oni-csharp.el index 927d46a..74d1fb5 100644 --- a/oni-csharp.el +++ b/oni-csharp.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0128.214417 +;; Version: 2020.0128.221359 ;; Package-Requires: (csharp-mode omnisharp oni-company oni-flycheck) ;; This program is free software; you can redistribute it and/or modify @@ -94,6 +94,9 @@ ;;;###autoload (add-to-list 'auto-mode-alist '("\\.xaml\\'" . nxml-mode)) +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.csproj\\'" . nxml-mode)) + ;;;###autoload(with-eval-after-load 'csharp-mode (require 'oni-csharp)) (provide 'oni-csharp) diff --git a/test/integration/oni-csharp.bats b/test/integration/oni-csharp.bats index 241a335..bdfcbd0 100644 --- a/test/integration/oni-csharp.bats +++ b/test/integration/oni-csharp.bats @@ -19,3 +19,13 @@ [[ "$output" == *"nxml-mode" ]] } + +@test "Opening a .csproj file loads nxml-mode" { + run emacs -batch -l package -f package-initialize \ + -visit test.csproj \ + -eval "(prin1 major-mode)" + + echo "$output" + + [[ "$output" == *"nxml-mode" ]] +}