microsoft / microsoft/language-server-protocol

Standardize LSIF capabilities vertex

Open
#1,753 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request lsif
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the C# and TypeScript LSIF generator outputs with the current specification, focusing on the capabilities vertex and its tokenTypes and tokenModifiers arrays. Resolve whether it is a vertex, where it appears, and how consumers handle its absence. Done means the specification and both generator formats agree well enough for #1754 to decode semantic tokens.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, typescript
Domain
developer-experience, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.