Skip to content

Standardize LSIF capabilities vertex #1753

@gundermanc

Description

@gundermanc

C# and TypeScript LSIF generators both have support for capabilities vertex. This doesn't yet appear to be referenced in the spec, however.

Such capabilities nodes look like:

{
  "hoverProvider": true,
  "declarationProvider": false,
  "definitionProvider": true,
  "referencesProvider": true,
  "typeDefinitionProvider": false,
  "documentSymbolProvider": false,
  "foldingRangeProvider": true,
  "diagnosticProvider": false,
  "semanticTokensProvider": {
    "tokenTypes": [
      "namespace",
      "type",
      "class",
      "enum",
      "interface",
      "struct"
    ],
    "tokenModifiers": [
      "static"
    ]
  },
  "id": 1,
  "type": "vertex",
  "label": "capabilities"
}

This is a requirement for #1754 which relies on the tokenTypes and tokenModifiers arrays above to decode encoded semantic tokens into token type names.

Open Questions:

  • Is this entry a vertex or not - In C#, it's not explicitly declared, in TypeScript it is.
  • Where in the file is it - In C# it's the first line. In TypeScript it tends to be 2nd or 3rd. If not first, what is the criteria for finding it, what if anything can come before it, and what is the expected consumer behavior when it is absent?

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionalitylsif

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions