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

Saving a php document with cursor inside a script tag causes cursor to jump to top of document #265

Closed
bdlowery opened this issue Feb 15, 2023 · 2 comments
Assignees
Labels

Comments

@bdlowery
Copy link

prettier version: 2.8.3
Prettier-PHP. version: 0.19.3
JsPrettier version: 1.62.0

Steps to reproduce the behavior:

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

JsPrettier settings:

{
	"debug": true,
	"auto_format_on_save": true,
	"additional_cli_args": { "--config-precedence": "file-override" },
	"custom_file_extensions": ["php"],
	"allow_inline_formatting": true,
}
@jonlabelle
Copy link
Owner

It's probably because the PHP plug-in isn't following the cursor API.

@github-actions
Copy link

This issue has been automatically locked due to inactivity. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants