diff options
author | 2020-01-28 22:15:41 -0800 | |
---|---|---|
committer | 2020-01-28 22:15:41 -0800 | |
commit | 34b78655c21a3b7902603c3a544f4a7fe469694d (patch) | |
tree | 6dd761ceb4518aba7a8912bf4f5419b11fa2d6b2 | |
parent | 76f9a50c45eb9a62f616294c1875f8afdcafa412 (diff) | |
download | emacs-config-34b78655c21a3b7902603c3a544f4a7fe469694d.tar.gz emacs-config-34b78655c21a3b7902603c3a544f4a7fe469694d.zip |
Enable nxml-mode for .csproj files
-rw-r--r-- | oni-csharp.el | 5 | ||||
-rw-r--r-- | test/integration/oni-csharp.bats | 10 |
2 files changed, 14 insertions, 1 deletions
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 <tom@ryuslash.org> ;; 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" ]] +} |