-
Notifications
You must be signed in to change notification settings - Fork 40
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
Formatter entry commands in activity bar #1006
Comments
alternatively, you can try the cli. it comes with a format-all command. just let you know. |
I know it, but then it is not testing the functionality of integrated formatter. This is the major motivation. |
This feature seems to be too much extra work, I don't think it's that useful. Just format all files in the workspace(or a directory recursively) seems good enough for almost all cases. |
Since Typst doesn't have a project structure, it would be hard to define "all files". For example, I don't want it to traverse node_modules (imagine a large project using Typst doc). Or we can only format dependencies, but that might not be sufficient (imagine we have multiple entries). In either case, I won't use this command. CLI would be much more flexible. |
I'm not sure what are you arguing about. But what I am sure is that the mentioned problem is a common curse. All tools scanning input directories recursively will run into this curse. For example, googling "rust-analyzer node_modules" you'll see some complaints that rust-analyzer hasn't solved it completely. So do you'll face similar situation when using the typstyle CLI. |
It's easy to feed arguments to CLI. But not so for LSP commands. |
@QuarticCat @Enter-tainer
Motivation
When I upgrade the integrated formatter, I have to Ctrl+S all files (about 50 files) to format and check them. I want to have formatting commands to automate that.
Description
It would be great to provide at least two commands:
After providing commands, we can register them to the sidebar to tell people that they exist:
The text was updated successfully, but these errors were encountered: