microsoft / microsoft/vscode-languageserver-node

activation onCommand leads to 'command x not found' if using executeCommandProvider

Open
#293 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
TypeScript
Stars
1.8k
Forks
404
Avg merge
2d 8h
Merged PRs (30d)
14

Description

Steps to reproduce:

  1. Register commands with an extension and use onCommand:myExtension.myCommand in activationEvents in the package.json.
  2. Add a language server with an executeCommandProvider for myExtension.myCommand
  3. Start debugging the language server and execute myExtension.myCommand in the command palette.

Result:
The language server is activated correctly, but the command is not executed. Instead a Command 'myExtension.myCommand' not found. error pops up.

Executing the command a second time works as the language server is already running.

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 with the package.json activationEvents entry and the language server's executeCommandProvider configuration described in the reproduction steps. Compare the first and second command-palette executions to trace why activation does not make the command available immediately. Done means myExtension.myCommand executes successfully on the first invocation without a command-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.