Skip to content

Instead of implementing pasls.inactiveRegions why not textDocument/publishDiagnostics? #161

Description

@oisanjaya

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions