[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode fdf46fe 492/495: Fix go.mod fontification.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode fdf46fe 492/495: Fix go.mod fontification. |
Date: |
Sat, 7 Aug 2021 09:06:16 -0400 (EDT) |
branch: elpa/go-mode
commit fdf46fe0e110a8e0dddb5aac4ab20a93ee9c5d88
Author: Muir Manders <muir@mnd.rs>
Commit: Peter Sanford <psanford@sanford.io>
Fix go.mod fontification.
Tweak keyword regex so it always allows version after module name.
Both modules and versions are now fontified properly in:
replace (
example.com/foo v1.2.3 => example.com/bar v4.5.6
)
Closes: #377 [via git-merge-pr]
---
go-mode.el | 2 +-
test/go-font-lock-test.el | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 21719a9..cdd83ac 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -3006,7 +3006,7 @@ If BUFFER, return the number of characters in that buffer
instead."
(defvar go-dot-mod-font-lock-keywords
`(
(,(concat "^\\s-*\\(" (regexp-opt go-dot-mod-mode-keywords t) "\\)\\s-") 1
font-lock-keyword-face)
-
("^\\s-*\\([^[:space:]]+\\)\\s-+\\(v[0-9]+\\.[0-9]+\\.[0-9]+\\)\\([^[:space:]\n]*\\)"
(1 'go-dot-mod-module-name) (2 'go-dot-mod-module-semver) (3
'go-dot-mod-module-version)))
+
("\\(?:^\\|=>\\)\\s-*\\([^[:space:]\n()]+\\)\\(?:\\s-+\\(v[0-9]+\\.[0-9]+\\.[0-9]+\\)\\([^[:space:]\n]*\\)\\)?"
(1 'go-dot-mod-module-name) (2 'go-dot-mod-module-semver nil t) (3
'go-dot-mod-module-version nil t)))
"Keyword highlighting specification for `go-dot-mod-mode'.")
;;;###autoload
diff --git a/test/go-font-lock-test.el b/test/go-font-lock-test.el
index 7f739c1..e9aef31 100644
--- a/test/go-font-lock-test.el
+++ b/test/go-font-lock-test.el
@@ -210,7 +210,13 @@ KgoK 1.13
KrequireK (
Nexample.com/require/go/bananaN Sv12.34.56SV-1234-456abcV D// DQindirect
-Q)
+Q Nnoslash.devN Sv1.2.3S
+)
+
+KreplaceK (
+ Nfoo.example.com/barN Sv1.2.3S => Nfoo.example.com/barN Sv1.2.3S
+ Nexample.com/foo/barN => Nexample.com/baz/barN
Sv0.0.0SV-20201112005413-933910cbaea0V
+)
" 'go-dot-mod-mode))
(defun go--should-match-face (want-face)
- [nongnu] elpa/go-mode 4fabba6 464/495: Small fix for fontification of array types, (continued)
- [nongnu] elpa/go-mode 4fabba6 464/495: Small fix for fontification of array types, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 656590a 463/495: Fontify qualified composite literal types., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d304565 474/495: Fix signature fontification after comments., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e9b9c0e 473/495: Add some fontification faces for go-dot-mod-mode., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4acf733 468/495: Fully fontify type and const decls., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode dac200f 469/495: Fix font locking in nested signatures., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode fa2162b 475/495: Fix "nil" fontification in type switch clause., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7ce031c 481/495: Allow disabling variable font locking., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e10d677 478/495: indent: fix func literals in dangling lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c9f5e92 483/495: Fix indentation of chained dangling selectors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode fdf46fe 492/495: Fix go.mod fontification.,
ELPA Syncer <=
- [nongnu] elpa/go-mode e8eea7f 487/495: Fix fontification of multiline type switch clauses., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2f2910c 223/495: fix end-of-defun for function with inline struct/interface arguments, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f1adac0 230/495: switch versioning to semver, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d9f0bee 232/495: add variable to customize godef command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3da268f 285/495: README: improve description of new functions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9047fcd 238/495: add a menu, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 466e188 239/495: add `go-play-browse-function', ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8c13a82 240/495: match identifiers, not type names, when highlighting struct literal, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 775c77a 241/495: immediately store match data in go-unused-imports-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode aaea941 242/495: bump version to 1.2.0, ELPA Syncer, 2021/08/07