summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua
diff options
context:
space:
mode:
authorMaria Solano <majosolano99@gmail.com>2026-04-19 16:05:51 -0700
committerGitHub <noreply@github.com>2026-04-19 19:05:51 -0400
commit5f6abd34f5c12534df0d79ee3507d40106ad505d (patch)
tree59da3b05c291183029c9703e45485bbd87d30760 /runtime/lua
parente8b39687749770e915135736a75d2de3536568e0 (diff)
fix(lsp): notify when maximum created `hl` groups is reached #39231
Diffstat (limited to 'runtime/lua')
-rw-r--r--runtime/lua/vim/lsp/document_color.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/document_color.lua b/runtime/lua/vim/lsp/document_color.lua
index 3799da4e8d..3f99787fbc 100644
--- a/runtime/lua/vim/lsp/document_color.lua
+++ b/runtime/lua/vim/lsp/document_color.lua
@@ -86,6 +86,10 @@ local function get_hl_group(hex_code, style)
-- Limit number of created highlight groups to 10000 to not approach near
-- a hard limit of 19999 highlight groups (`:h E849`)
if n_color_cache > 10000 then
+ vim.notify_once(
+ 'E849: The maximum number of highlight groups has been reached.',
+ vim.log.levels.WARN
+ )
return nil
end