-
Notifications
You must be signed in to change notification settings - Fork 12
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
Use formatter API for better integration #5
Comments
Thank you for actually looking at my code guys. I have been meaning to do this, but after the vscode 1.6.0 update came out, I didn't know where to look for the right events to hook into. So you pointed me into the right direction, @jrieken. Unfortunately, my extension is in plain old JS, so I couldn't figure out how to translate the TypeScript to plain JS. I struggled with that for a couple of hours and eventually gave up because I had other things to do. @maxmatthews I saw your pull request and tested it locally. Unfortunately it doesn't seem to be working. I wrote a review on the pull request. |
Anything I can help you guys with? |
I will be rewriting the plugin in TypeScript somewhere in the near future. That will help with integrating the new VSCode features more easily. So, for now, I don't think there is anything you could necessarily help with. Other than that, I want to commend you on your superb commitment @jrieken. Thanks! |
Resolved with conversion to TypeScript in latest milestone. |
I'd recommend to use the languages API to register a formatting edits provider because it will allow for a better integration in VS Code. There is the
registerDocumentFormattingEditProvider
-function which is the way to introduce a formatter for certain document types. It will integrate you into the Format Code action (context menu, F1) and also into the Format On Save-feature.It's more or less a matter of calling this code from within
DocumentFormattingEditProvider
The text was updated successfully, but these errors were encountered: