microsoft / microsoft/language-server-protocol

Feature Request: Symbol scope information in CompletionItem

Open
#1,350 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Idea: Provide information on symbol scope in completion results.
Rationale: Although server-side filtering and sorting is preferable, clients may wish to perform additional sorting and filtering based on the scope of completion items, e.g. to prefer local variables, etc. Currently, CompletionItem and CompletionItemKind do not seem to provide sufficient information to do so. Adding e.g. an enum for basic symbol scopes and providing a field of this type in CompletionItem seems like a reasonably simple way to add this capability.
Related issues: #898, maybe others?

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

Start by reviewing the CompletionItem and CompletionItemKind definitions and the discussion in related issue #898. Determine the appropriate representation for basic symbol scopes and how scope information should be exposed in completion results; done means the proposal is specified clearly enough for clients and language servers to implement consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.