microsoft / microsoft/language-server-protocol

client -> server requst: Goto Parent Module

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

Nobody has claimed this yet.

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

Description

Parent Module

Server Capability: { "parentModule": boolean }

This request is send from client to server to handle "Goto Parent Module" editor action.

Method: experimental/parentModule

Request: TextDocumentPositionParams

Response: Location | Location[] | LocationLink[] | null

Example
// src/main.rs
mod foo;


// src/foo.rs

/* cursor here*/

experimental/parentModule returns a single Link to the mod foo; declaration.

Unresolved Question
  • An alternative would be to use a more general "gotoSuper" request, which would work for super methods, super classes and super modules. This is the approach IntelliJ Rust is takeing. However, experience shows that super module (which generally has a feeling of navigation between files) should be separate. If you want super module, but the cursor happens to be inside an overriden function, the behavior with single "gotoSuper" request is surprising.

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 proposed experimental/parentModule request and the existing language server protocol conventions in this repository. The issue provides no file or test entry point; done would require resolving the separate parent-module versus general gotoSuper design and updating the protocol accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, typescript
Domain
api, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.