-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<leader>f applied to selection formats whole file instead of the selection #120
Comments
Can't reproduce, which language server/extension do you use when do formatting? I can't reproduce your mini.vim error, looks like your mini.vim has some error. |
TS/JS (tsserver) with prettier or with prettier plugin switched off. |
Tested with coc+tsserver, still can't reproduce. |
I have the same behavior, when use coc-prettier. vim version: NVIM v0.5.0-dev+1197-ga17782042 |
Yes, it seems like coc-prettier is the culprit.
It formats the whole file. @chemzqm @fannheyward |
Prettier doesn't provide range format. |
|
@osenvosem Do you have the If you try running it as a command instead of mapping, do you get the same symptoms?
|
I can reproduce, old version of prettier doesn't work with range https://prettier.io/docs/en/options.html#range |
Key bindings are default ones from the README.md, didn't change anything. The command you offered has the same behavior. |
Result from CocInfo
Describe the bug
The whole buffer is formatted instead of just selected lines.
Reproduce the bug
We will close your issue when you don't provide minimal vimrc and we can't
reproduce it
This is the result of trying to launch
vim -u mini.vim
:Screenshots (optional)
Screen.Recording.2021-03-31.at.13.38.26.mov
The text was updated successfully, but these errors were encountered: