Per spec, textDocument/documentColor returns ColorInformation[] and must never return null. In vue language server it does return null in some cases. For example when style block is removed in a vue file.
I suppose this code might be responsible (undefined becomes null when passed through JSON RPC):
|
return plugin[1].provideDocumentColors?.(document, token); |
Per spec,
textDocument/documentColorreturnsColorInformation[]and must never returnnull. In vue language server it does returnnullin some cases. For example whenstyleblock is removed in a vue file.I suppose this code might be responsible (undefined becomes null when passed through JSON RPC):
volar.js/packages/language-service/lib/features/provideDocumentColors.ts
Line 18 in 7c37b52