prettier / prettier/vim-prettier

PrettierPartial formats the entire buffer in visual mode

Open
#257 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
1.8k
Forks
137
PR merge metrics
No merged PRs in 30d

Description

Do you want to request a feature or report a bug?
This is possibly a bug... But it is likely I am not doing things correctly

What is the current/expected behavior?
When I do :PrettierPartial in visual mode, the entire buffer gets formatted (both the selected text and the unselected text), but when I do :Prettier or :PrettierAsync in visual mode, only the selected text is formatted. Is this the expected behavior? It seems to me their names suggest the reverse... Am I doing something wrong? I am happy to provide extra config info if this is an unexpected behavior.

What version of vim-prettier are you using - (output of :PrettierVersion) ?

:PrettierVersion
1.0.0-alpha

What version of prettier are you using - (output of :PrettierCliVersion) ?

:PrettierVersion
1.19.1

What is your prettier executable path - (output of :PrettierCliPath) ?

:PrettierCliPath
$HOME/.vim/bundle/vim-prettier/node_modules/.bin/prettier

Did this work in previous versions of vim-prettier and/or prettier ?
Haven't tried

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

Reproduce the reported behavior by selecting text in visual mode and running :PrettierPartial, then compare it with :Prettier and :PrettierAsync. Determine the intended selection scope and consider the issue resolved when the commands' behavior matches their documented or intended semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.