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

Text / code block formatting issue for saved files #3888

Open
strengejacke opened this issue Jul 5, 2024 · 2 comments
Open

Text / code block formatting issue for saved files #3888

strengejacke opened this issue Jul 5, 2024 · 2 comments
Labels
area: formatting Issues related to formatting and indentation enhancement New feature or request lang: r support

Comments

@strengejacke
Copy link

Positron Version:

Positron Version: 2024.07.0 (system setup) build 2024.07.0-15
Code - OSS Version: 1.90.0
Commit: d8da3ec
Date: 2024-07-05T03:18:37.706Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

Steps to reproduce the issue:

  1. Create two files. One is saved to disk, one file is not yet saved.
  2. You have code with indention. If you copy the code and paste it elsewhere, indention is removed for the file that has been saved (unexpected behaviour), but not for the new file (expected behaviour).
  3. Similar, if you paste text into an existing line, a line-break is inserted for the saved file (unexpected behaviour) but not for the new file (expected behaviour)

Were there any error messages in the output or Developer Tools console?

No.

See videos here: first file is saved to disk, indention is removed or a line-break inserted. Second file in the videos is the new file, where we find the expected behaviour.

indent.mp4
indent2.mp4
@strengejacke strengejacke added the bug Something isn't working label Jul 5, 2024
@juliasilge juliasilge added lang: r area: formatting Issues related to formatting and indentation labels Jul 5, 2024
@juliasilge
Copy link
Contributor

We have initial formatting set up for R in Positron using styler plus an indent-only formatter (see posit-dev/ark#329 for details) but in the longer term plan for a full formatter for R, as outlined in #2251.

@juliasilge juliasilge added enhancement New feature or request and removed bug Something isn't working labels Jul 5, 2024
@juliasilge juliasilge added this to the Release Candidate milestone Jul 5, 2024
@strengejacke
Copy link
Author

But what I think is strange is that formatting works for new files, but indention is removed / formatting broken for saved files. I'm not complaining about yet missing formatting features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: formatting Issues related to formatting and indentation enhancement New feature or request lang: r support
Projects
None yet
Development

No branches or pull requests

3 participants