PowerShell / PowerShell/PowerShellEditorServices

Add a "scroll to position" function

Open
#635 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Code Navigation Issue-Enhancement
Dominant language
C#
Stars
767
Forks
266
Avg merge
3d 16h
Merged PRs (30d)
1

Description

I was looking at implementing some editor commands that scroll to next function/method/thing and none of the current API's scroll. Looks like there was a change at some point that made insert text, set selection, etc not scroll by default in VSCode.

We should implement a new request ShowEditorPositionRequest and add a function (Show-EditorPosition?) to Commands that sends it (and optionally also add it to $psEditor)

The VSCode implementation could use the TextEditor.revealRange method.

Contributor guide

Open the contributing guide

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 tracing how Commands sends editor requests and how the VSCode implementation handles editor operations. Review the proposed ShowEditorPositionRequest, the Show-EditorPosition command, and the optional $psEditor API, then compare the VSCode TextEditor.revealRange documentation. Done means the request and command can reveal the requested editor position in VSCode.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell, vscode
Domain
developer-experience, devtools
Issue type
Feature
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.