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

Live-Preview: Add option to disable reload while typing #7002

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tronical
Copy link
Member

@tronical tronical commented Dec 4, 2024

Add a slint.preview.reloadOnType setting that can be set to false to reload the preview only when saving a file.

cc #6357

Add a slint.preview.reloadOnType setting that can be set to false to reload the preview only when saving a file.

cc #6357
@ogoffart
Copy link
Member

ogoffart commented Dec 5, 2024

As currently implemented, I believe this will not only impact the preview, but also other LSP feature. Making things like auto-complete or syntax coloration completely broken. (I haven't test, but I assume)

I suggest to limit the settings to the reloading of the preview.

@tronical
Copy link
Member Author

tronical commented Dec 5, 2024

As currently implemented, I believe this will not only impact the preview, but also other LSP feature. Making things like auto-complete or syntax coloration completely broken. (I haven't test, but I assume)

I suggest to limit the settings to the reloading of the preview.

Yes indeed, I agree. Serves me right for attempting this late in the night :).

@NigelBreslaw
Copy link
Member

This should also be the default. It would bring the behaviour inline with the other hot-reload tools in VS Code and solve the confusion where changes don't get added to git because they were unsaved, but still showing in the live preview.

@ogoffart
Copy link
Member

ogoffart commented Dec 5, 2024

It would bring the behaviour inline with the other hot-reload tools in VS Code

This is not my experience. Eg, the markdown preview is changing as you type same for the HTML preview.
What other hot-reload tools are you talking about?

(I personally find the preview as we type quite neat)

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

Successfully merging this pull request may close these issues.

3 participants