Skip to content
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

Cursor jumps to start of file after formatting javascript inside of a php file. #2148

Open
bdlowery opened this issue Feb 16, 2023 · 0 comments

Comments

@bdlowery
Copy link

prettier version: 2.8.3
Prettier-PHP version: 0.19.3

Steps to reproduce the behavior:

open a .php file with html, php, and a script tag in it
go down to the script tag
save the document
your cursor will jump to the start of the document.

I'm using Sublime, so I'm using the JsPrettier plugin. Here are my JsPrettier settings:

{
	"debug": true,
	"auto_format_on_save": true,
	"additional_cli_args": { "--config-precedence": "file-override" },
	"custom_file_extensions": ["php"],
	"allow_inline_formatting": true,
}

The maintainer of prettier on sublime seems to think it's because the Prettier-PHP plugin isn't following the cursor API.

Anyone else run into this issue? It's super annoying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant