inactiveRegions is custom LSP extension originally created for clangd.
Why don't we use textDocument/publishDiagnostics with Unnecessary tag which is standard LSP message.
Or maybe we do both?
I made test case hacking TCheckInactiveRegions.Execute to also send textDocument/publishDiagnostics with Unnecessary tag, and I feel that inactive regions marking could be handled. Maybe I'll make PR once i done with that.
I read that clangd decide to use custom message because Vscode render unnecessary tag without syntax highlighting. Also i heard their parser don't produce AST nodes for inactive regions so they create their own system to let Vscode render correctly.
I don't use Vscode personally, I use Zed. In Zed, they are able to render regions with Unecessary tag correctly, i.e. dimmed but sytax highlighting still intact.
inactiveRegions is custom LSP extension originally created for clangd.
Why don't we use textDocument/publishDiagnostics with Unnecessary tag which is standard LSP message.
Or maybe we do both?
I made test case hacking TCheckInactiveRegions.Execute to also send textDocument/publishDiagnostics with Unnecessary tag, and I feel that inactive regions marking could be handled. Maybe I'll make PR once i done with that.
I read that clangd decide to use custom message because Vscode render unnecessary tag without syntax highlighting. Also i heard their parser don't produce AST nodes for inactive regions so they create their own system to let Vscode render correctly.
I don't use Vscode personally, I use Zed. In Zed, they are able to render regions with Unecessary tag correctly, i.e. dimmed but sytax highlighting still intact.