-
Notifications
You must be signed in to change notification settings - Fork 92
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
Feature request: RStudio command: Reflow selected comment lines so they wrap evenly #1778
Comments
Thinking about this a little ... VS Code doesn't seem to have this feature natively (which is kind of a surprise; like spell check -- see #1485 -- it seems pretty basic). There is an incredibly popular extension ("Rewrap") that adds the functionality. https://marketplace.visualstudio.com/items?itemName=stkb.rewrap We could bundle the extension, but it feels like this is something we might want to have an extensibility point for in language packs. RStudio's reflow logic is very complicated because it tries to be smart about e.g. roxygen tags and indentation. |
Also requested by @cderv here: https://positpbc.slack.com/archives/C05M2EZCPGR/p1705938483308749?thread_ts=1705091129.004509&cid=C05M2EZCPGR
|
Also requested by private beta user: https://github.com/posit-dev/positron-beta/discussions/98 |
I also miss this RStudio feature a lot. |
I don't think I'm 100% surprised about this because I think your formatter typically provides this - like in rustfmt you can control this and have it reflow comments on save |
If you are in an R file, you can use this extension pretty smoothly for regular comments, but it doesn't deal with roxygen comments well. If you are in a Quarto file, that extension doesn't work (I believe because the language ID is "quarto" which it doesn't know how to handle). I've opened this issue so we can see what to do about this. |
Hello! any news on this? expecially roxygen documentation reflowing is though by hand |
This feature would be really nice to have because at the moment, there are times when roxygen tags that are not properly indented end up borking: r-lib/roxygen2#1651 |
Positron Version:
Positron Version: 2023.10.0 (Universal) build 1453
Code - OSS Version: 1.83.0
Commit: b781e9e
Date: 2023-10-30T03:03:08.650Z
Electron: 25.8.4
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 22.6.0
Steps to reproduce the issue:
What did you expect to happen?
I love this feature from RStudio, i can write write write, do the keybinding and don't have to worry about anything (mostly)
Might be related to #1407
Were there any error messages in the output or Developer Tools console?
Nope
The text was updated successfully, but these errors were encountered: