microsoft / microsoft/language-server-protocol

Feature Request: allow Code Actions on files/directories

Open
#1,239 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

At the moment, code actions are invoked for a specific position in a file. It can be useful to allow asking for code actions for a file or directory instead. For example, for VS Code this means supporting <kbd>ctrl+.</kbd> directly in the explorer.

Specific use-case: in Rust, files correspond to modules, and some module-level refactors make sense to invoke from the explorer:

  • change foo.rs to foo/mod.rs and vice verse
  • "inline" the module into the parent module

EDIT: to clarify, this is not remotely high-priority for us, just something where ideally we should have feature-parity with IntelliJ :)

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 identifies position-based code actions and VS Code Explorer invocation as the starting points. First review how the Language Server Protocol represents code-action requests, then determine how file- and directory-scoped requests would fit. Done means the protocol supports the requested scopes and can represent the listed Rust module refactors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, vscode
Domain
api, devtools
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.