rescript-lang / rescript-lang/rescript-vscode

Feature: format selection

Open
#542 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ReScript
Stars
354
Forks
63
Avg merge
11h 29m
Merged PRs (30d)
1

Description

I'm new to ReScript and I've been trying the VS Code extension with Format on Save enabled. However, I'd like to manually control formatting with the Format Selection command (more on my reasons here). But the extension's formatter only seems to support whole file formatting. Neither Format Selection, nor setting the Format on Save Mode to "modifications", seem to do anything.

This would be an important feature for me since I don't think I can carry on with Format on Save enabled (I don't like some of the formatter's behaviour) but I'd like to stick to standard formatting as much as possible so it would help a lot with that.

I don't know if this is an issue with the extension or with the formatter itself being unable to handle partial content, but I thought I'd create the issue for the component where I experience the problem.

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 the VS Code extension's formatter entry points for Format Selection and the Format on Save Mode setting. Determine whether partial-content formatting is handled by the extension or the formatter; done means both selection formatting and modification-based formatting produce the expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
tooling
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.