Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize LSIF capabilities vertex #1753

Open
gundermanc opened this issue Jun 23, 2023 · 1 comment
Open

Standardize LSIF capabilities vertex #1753

gundermanc opened this issue Jun 23, 2023 · 1 comment
Labels
feature-request Request for new features or functionality lsif
Milestone

Comments

@gundermanc
Copy link
Member

gundermanc commented Jun 23, 2023

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?
@gundermanc gundermanc changed the title Standardize capabiliities vertex Standardize LSIF capabiliities vertex Jun 23, 2023
@gundermanc gundermanc changed the title Standardize LSIF capabiliities vertex Standardize LSIF capabilities vertex Jun 24, 2023
@dbaeumer
Copy link
Member

It is a vertex and it describes which capabilities (in terms of LSP capabilities the dump supports). This allows LSP servers that surface a LSIF graph to provide the right capabilities on the intialize response.

The constraint I would add to the spec is that the vertex needs to be emitted BEFORE that first project vertex is emitted.

@dbaeumer dbaeumer added feature-request Request for new features or functionality lsif labels Dec 11, 2023
@dbaeumer dbaeumer added this to the Backlog milestone Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality lsif
Projects
None yet
Development

No branches or pull requests

2 participants