Skip to content
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 Visual Studio Community Toolkit to access common services, fixes #44 #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

majocha
Copy link

@majocha majocha commented Feb 8, 2023

I did some experiments to resolve #44 and thought I might as well make a PR out of it.

This adds Visual Studio Community Toolkit as dependency.
See also: https://www.vsixcookbook.com/

It might simplify stuff in the long run, for now it does decouple the common services from the package. In effect the command handler does not depend on the package or wait for it.

FantomasService is now wrapped as MEF component, so it also no longer depends on the package to be loaded and later disposed.

With this the extension works in any editor with F# content type, so I can just open a folder of .fsx scripts and get formatting.

@deviousasti
Copy link
Member

Thank you for hacking on this!
Wow, this is a major change! I'll review it over the weekend if that's okay.

@majocha
Copy link
Author

majocha commented Feb 9, 2023

Great! There's no rush. And thank you for this awesome extension, @deviousasti.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extension does not load when a folder is opened in VS instead of a solution
2 participants