microsoft / microsoft/language-server-protocol

Trigger new Completion after Acceptance

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

I'm writing a custom LSP for HTML and I'm wondering if it is possible to trigger a new completion after someone accepts a completion item. For example, let's say that a user is selecting a role attribute value in HTML and it autocompletes with additional attributes that pair with the specified role (| represents the cursor):

Initial completion state:

<div role="|"></div>

After first completion:

<div role="checkbox" aria-checked="|"></div>

Ideally a new completion should be triggered automatically where the cursor is for the value of aria-checked, but right now it does not. Is something like that possible?

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

No file or test is identified in the issue. Start by reviewing the LSP completion and completion-item behavior relevant to acceptance, then determine whether the protocol can request another completion at the new cursor position. Done means documenting a supported mechanism or clarifying the protocol change needed.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
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.