-
Notifications
You must be signed in to change notification settings - Fork 4
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
Formatting (gqap or similar) replaces the buffer contents by an error message in case of error #11
Comments
For the record, I have created raco-fmt-or-cat for my own short term needs. |
I don't use any autoformatting, but the issue is still relevant (for example: Manually, I One could wrap The good news is this: If you don't like The program is very much a formatter, not an indenter, so [Apologies in advance for the lack of quoted replies and the presence of disjointed paragraphs; I am in a bit of a hurry.] |
Thanks @benknoble for the quick answer. I had overlooked And your view about Thanks finally for the recommendation about Slightly related to the Vim configuration structure, one thing I kind of lack in this plugin is more documentation. My main question would be: what does this plugin actually claim the solve for me? That it provides some support for Racket is pretty much all I know right now (apart from the specific |
I'm not sure I follow what you mean by difference in tool and motion; by tool I am sure you mean At any rate: based on my prior comments, I'm tempted to close this issue as "wontfix" just to clarify my position; I would need a persuasive argument to make changes at this point. I'll wait for your response before I make any hasty decisions, though, and that doesn't mean the rest of the discussion [see below] isn't valuable.
Please let me know if you have more questions about
This is correct; see #6 for example. The README could certainly offer a better taste of the support offered, and a help page could detail usage, configuration, etc. I just haven't written it yet. (And it could probably include mention of the problem in this issues title and suggestions for handling it.) One answer to your question: some of this plugins basic files are included in Vim's runtime files (or outdated versions of them, anyway). This would include syntax, ftplugin, indent, and compiler files IIRC. Syntax and indent support should sound obvious (if not look it), although the ftplugin and compiler files might be less so. They provide Racket-specific mappings (e.g., for looking up documentation) and The second answer to your question is that this plugin, in addition to what's occasionally include in the Vim runtime files, offers unique filetype detection for Racket: each This filetype detection is not without its downsides: making LSPs and similar work requires you to redirect non-
None taken. Thanks for the feedback. At the moment, my programming energy is spent at work and on https://github.com/benknoble/frosthaven-manager. But I write all the Racket for the latter project in Vim, so I make occasional improvements to it as I work. Suggestions welcome. |
@benknoble, thanks for the additional information. Please feel free to close. I guess we can archive the issue as properly documented. Bonne journée. |
À vous aussi 🇫🇷 |
Just in case someone would come across this issue, I now think that the whole thing was more about a misconfiguration on my part than anything else. My Vim configuration was built from scratch, which generally is a good thing, but I ended up missing a few very basic sane defaults, and that made my undo functionality very weak. I could basically not undo changes made before write. I believe what has solved that is simply:
from https://github.com/vim/vim/blob/master/runtime/vimrc_example.vim. In any case, with a correct backup/undo configuration, this issue really is a non-issue. Good that it's closed, then... |
Tested at 1c02b65.
To reproduce the issue:
Press
gpap
(format current paragraph). The contents of the buffer will be changed to:At this point, I can of course undo, but somehow that does not feel so sane. If I start using auto-formatting upon save, for instance, this potentially becomes hard to undo.
The explanation for this is sorawee/fmt#44, i.e. not really this plugin's issue, but as long as that issue is not solved, using
raco fmt
as a format external program does not feel like a very good solution.Hoping for a solution for that issue and looking forward, I also wonder whether using
raco fmt
asformatprg
is the best possible choice. In particular, I wonder whether it would be better to pointequalprg
to it instead. This idea is somewhat related to sorawee/fmt#43. Given thatraco fmt
does not format comments, and given that there is no real plan to change that, leavingformatprg
empty would allow the users to use the default formatter, which typically works well enough, for comments.The text was updated successfully, but these errors were encountered: