[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 4da4c39 231/459: Fix fontification of names
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 4da4c39 231/459: Fix fontification of namespaces to match using-statement rules. |
Date: |
Sun, 22 Aug 2021 13:59:33 -0400 (EDT) |
branch: externals/csharp-mode
commit 4da4c399f8a993d658ffc2817ecad4a5d4cc2247
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Fix fontification of namespaces to match using-statement rules.
---
csharp-mode-tests.el | 6 ++++++
csharp-mode.el | 2 +-
test-files/namespace-fontification.cs | 7 +++++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 1e5a954..584da2d 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -123,6 +123,12 @@
"WithNumbers09.Ok" 'font-lock-constant-face
))
+(ert-deftest fontification-of-namespace-statements ()
+ (assess-face-in-file= "./test-files/namespace-fontification.cs"
+ "namespace" 'font-lock-keyword-face
+ "Reference" 'font-lock-constant-face
+ "Under_scored" 'font-lock-constant-face
+ "WithNumbers09.Ok" 'font-lock-constant-face
))
(defun list-repeat-once (mylist)
diff --git a/csharp-mode.el b/csharp-mode.el
index 08504db..8efdf32 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -1110,7 +1110,7 @@ to work properly with code that includes attributes."
;; this needs to be done in the matchers-after because
;; otherwise the namespace names get the font-lock-type-face,
;; due to the energetic efforts of c-forward-type.
- ,`("\\<\\(namespace\\)[
\t\n\r\f\v]+\\(\\(?:[A-Za-z_][[:alnum:]]*\\.\\)*[A-Za-z_][[:alnum:]]*\\)"
+ ,`("\\<\\(namespace\\)[
\t\n\r\f\v]+\\(\\(?:[A-Za-z0-9_]+\\.\\)*[A-Za-z0-9_]+\\)"
2 font-lock-constant-face t)
diff --git a/test-files/namespace-fontification.cs
b/test-files/namespace-fontification.cs
new file mode 100644
index 0000000..9c7e8dd
--- /dev/null
+++ b/test-files/namespace-fontification.cs
@@ -0,0 +1,7 @@
+namespace Reference {
+
+}
+
+namespace Under_Scored {
+
+}
- [elpa] externals/csharp-mode 2595b90 449/459: Revert "Tweak mode to not require tree-sitter packages", (continued)
- [elpa] externals/csharp-mode 2595b90 449/459: Revert "Tweak mode to not require tree-sitter packages", ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 166a5fb 340/459: Revert "Handle "nameof" entirely in c-basic-matchers-after.", ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1e7bf8a 358/459: Update build.yml, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a685c7f 359/459: Update build.yml, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e2541a4 362/459: Update README.org, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c1489db 370/459: First small tree-sitter query, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2bf76fd 378/459: Fix csharp-mode initialization without forked tree-sitter, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7e7353a 133/459: Imenu fixes: methods with comments, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1de5644 227/459: using: Don't mess up alnums in indentifier-fontification., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 8d43a70 229/459: Fix fontification of using-statements., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 4da4c39 231/459: Fix fontification of namespaces to match using-statement rules.,
ELPA Syncer <=
- [elpa] externals/csharp-mode 5e47b77 260/459: Fix error handling multiline compiler-directives., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 20efdc8 262/459: Add support for highlighting function-invocation., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d365498 307/459: Merge pull request #170 from josteink/compiler-fontifications, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 72c1912 314/459: Name change of codedoc functions, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ecc3f38 317/459: Add annotation-top-cont as a new syntax construct, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 51ab628 319/459: Update README.org, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode be5af57 322/459: Fix optional type suffix regex, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 217d3a7 324/459: Revert "Add nullable operator to concatenated identifiers", ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 97903a2 327/459: Merge pull request #179 from josteink/feature/compilation-mode-dotnetcore, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c44989a 331/459: Merge pull request #183 from josteink/vscode-fontification, ELPA Syncer, 2021/08/22