microsoft / microsoft/language-server-protocol

New CompletionItemTag for completions that import a new dependency

Open
#1,306 6 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

Hi everyone,

We are currently designing on our VSCode fork a way of showing on the client if a dependency is going to be auto-imported/added when a completion item is added.

From a UX standpoint, this is important for us since we have a big monorepo and adding a new dependency might make the building times slower as well as raising other issues and quirks. For that reason, we want to nudge users that selecting an specific item is going to import a dependency via the additionalTextEdits.

Since this might be useful not only for us, I am suggesting we add a new CompletionItemTag value named: ImportsDependency, AddsDependency or any other similar wording.

This would make it available for clients to show such a hint in case completions coming from language servers are also going to auto-import a dependency.

What are your thoughts regarding that?
I am happy to help with a PR, if you think that is useful.

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

The issue names no files, tests, or entry points. Review the existing CompletionItemTag and additionalTextEdits protocol definitions, then determine the tag wording, semantics, and client-facing behavior needed to signal that a completion adds a dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.