mirror of
https://github.com/neovim/neovim.git
synced 2026-06-25 20:55:30 +00:00
[Backport release-0.9] feat(highlight): Allow hyphens (-) in highlight group names (#25661)
feat(highlight): allow hyphens (-) in highlight group names
Fixes: https://github.com/neovim/neovim/issues/23184
(cherry picked from commit f37916b93b)
Co-authored-by: Gregory Anders <greg@gpanders.com>
This commit is contained in:
committed by
GitHub
parent
01f1ac36a9
commit
87bfa82bdf
@@ -1947,7 +1947,7 @@ static int syn_add_group(const char *name, size_t len)
|
||||
if (!vim_isprintc(c)) {
|
||||
emsg(_("E669: Unprintable character in group name"));
|
||||
return 0;
|
||||
} else if (!ASCII_ISALNUM(c) && c != '_' && c != '.' && c != '@') {
|
||||
} else if (!ASCII_ISALNUM(c) && c != '_' && c != '.' && c != '@' && c != '-') {
|
||||
// '.' and '@' are allowed characters for use with treesitter capture names.
|
||||
msg_source(HL_ATTR(HLF_W));
|
||||
emsg(_(e_highlight_group_name_invalid_char));
|
||||
|
||||
Reference in New Issue
Block a user