-
Notifications
You must be signed in to change notification settings - Fork 7
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
Autofix via documentFormattingProvider
#20
Comments
Heya, I hadn't thought of this because typos is often used with source code, which typically has its own document formatter. So in most cases I would expect the default formatter to be specific to the file type (eg: prettier for javascript). I can't think of a use-case or file type where you would want to use typos instead of a source code formatter? |
No, not using typos instead of a source code formatter, but rather using typos in addition to the source code formatter. Not familiar with other editors, but in nvim, when I run |
Ah thanks for the elaboration. You are using nvim. I use vscode which AFAIK doesn't have an "apply all formatters" command, so I wasn't aware this was a thing! Because of the difference between editors, I don't think I'd want this enabled by default, but I can see a new config option that if set would offer the |
Yep, enabling it via setting should be good |
Commonly, LSPs provide formatting capabilities (
documentFormattingProvider
).For typos, it could be useful be able to autofix misspellings via LSP-formatting. Essentially what
typos --write-changes
does, only triggered from inside the IDE.The text was updated successfully, but these errors were encountered: