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

VS support #3

Closed
ovatsus opened this issue Apr 15, 2013 · 22 comments
Closed

VS support #3

ovatsus opened this issue Apr 15, 2013 · 22 comments

Comments

@ovatsus
Copy link

ovatsus commented Apr 15, 2013

It would be great to have a Visual Studio extension with this so you could you Ctrl+K Ctrl+D in F# source files like you can in C# source files

@dungpa
Copy link
Contributor

dungpa commented Apr 15, 2013

Hi Gustavo,

Despite my zero knowledge on VS extension, this is on the TODO list.

There are a few reasons that it hasn't been implemented yet:

  • This tool means to be an offline one. I use the F# parser instead of the F# lexer, so some information is distorted.
  • It only can support formatting the whole source file, formatting a block is impossible due to whitespace significance.
  • The set of preferences is still primitive. I would love to hear your suggestions to improve them (see https://github.com/dungpa/fantomas/blob/master/Usage.md#preferences).

That said, there are some problems with the core that will occupy my time. I hope that someone in F# community steps up to help with this issue.

@greenbutton
Copy link

Hi,

I've started a project for this at https://github.com/itowlson/fsharp-vs-commands. It's very rudimentary at the moment, no support for preferences, but I'll try to get that fixed over the next few days (and will probably try to move some of the code over into F# -- it's C# at the moment because that makes it slightly easier to get the VS integration going). Please feel free to take it into Fantomas if you want -- I started a separate project so that I could add other non-formatting commands to it if I wanted to. Also please let me know if you want me to provide additional attribution or include a copy of your licence.

@dungpa
Copy link
Contributor

dungpa commented Apr 20, 2013

@greenbutton This is sweet. Thank you for starting it. Let me know when the project is ready for testing; I'm eager to try.

I did some investigation, my assessment also shows that starting C# is the reasonable choice. Later we could gradually move the add-in towards F#.

Personally, I would like to separate formatting commands from other commands and add the add-in to this repository. It's easier to update and deploy the add-in.

@dungpa
Copy link
Contributor

dungpa commented Apr 26, 2013

@greenbutton @itowlson What is the status of the VS add-in :-)?

@itowlson
Copy link
Contributor

Planning to look at it this weekend. I'm happy for you to take the code into the Fantomas repo. What are your priorities for me to address before you do that -- build script, bug fixes, etc.?

@dungpa
Copy link
Contributor

dungpa commented Apr 26, 2013

@itowlson Thanks. My priorities would be:

  • Allowing changing preferences
  • Detecting fsi files correctly
  • Preliminary support for formatting selection
  • Adding build script
  • Bug fixes

@itowlson
Copy link
Contributor

@dungpa Preferences and FSI detection are now in. I need to have a think about 'format selection' but your and Vasily's suggestions sound like a promising compromise between making it functional and keeping it simple!

@dungpa
Copy link
Contributor

dungpa commented Apr 28, 2013

@itowlson Great. When the addin is feature complete, could you please create a pull request and put the project into vs or addin, etc under the root folder. It definitely is the most awaited pull request :-).

@dungpa
Copy link
Contributor

dungpa commented May 11, 2013

@greenbutton @itowlson Did you receive my message at itowlson/fsharp-vs-commands#2 (comment) about status of the VS add-in?

@itowlson
Copy link
Contributor

@dungpa Many apologies. I've been away this weekend and wasn't checking email. I'll respond over there.

@dungpa
Copy link
Contributor

dungpa commented May 17, 2013

@itowlson No problem. I'm waiting for your answer there.

@dungpa
Copy link
Contributor

dungpa commented Jun 7, 2013

@greenbutton @itowlson Have you seen my message at itowlson/fsharp-vs-commands#2 (comment) :-)?

@itowlson
Copy link
Contributor

itowlson commented Jun 7, 2013

Sorry, been travelling (again). I am happy to transfer whenever is convenient for you (and agree it would be best as I'm struggling to be responsive!). How do you want to do this? Do I need to fork the main Fantomas project and add my code to the fork, then you merge back in? Or would it be easier for you to just take the files and add them to your repo?

@dungpa
Copy link
Contributor

dungpa commented Jun 7, 2013

@itowlson It would be great if you can create a pull request and put the VS extension under vs folder in the root directory. That's even better if you can preserve commit history while transferring the code.

Let me know how I should attribute your work. I will add a few more sentences on README, but I'm not sure it's enough.

@ovatsus
Copy link
Author

ovatsus commented Jul 1, 2013

Could you upload the addin to the Visual Studio gallery, so it's searchable and installable from the VS extension manager?

@dungpa
Copy link
Contributor

dungpa commented Jul 1, 2013

@ovatsus @vasily-kirichenko The extension is now live at http://visualstudiogallery.msdn.microsoft.com/24ef5c87-b4e3-4c3b-b126-1064cc66e148

I would love to hear your initial feedbacks. If there is no serious issue, I will write up a short blog post and announce the release tomorrow. Thanks.

@ovatsus
Copy link
Author

ovatsus commented Jul 1, 2013

Thanks, I gave it a try and it seems to work fine. I didn't like some of the adjustments, but I'll report them separately

@ghost
Copy link

ghost commented Jul 1, 2013

The plugin itself is installing fine and works well.

However, you’ve now made it so easy to use that you’re going to get an absolute flood of issue reports. We noticed this with the F# type checker – as soon as we added type checking to Visual Studio, we found bugs at a much greater rate.

You’re doing an amazing job – so don’t take the feedback the wrong way. It’s the joy of having users 

Cheers!
Don

@ovatsus
Copy link
Author

ovatsus commented Jul 1, 2013

Yes, this tool is awesome, in addition to being very useful, it's going to make a noticeable difference when demoing F# to C# devs. From my experience, when they complain about tooling, after not having rename and folders, the auto formatting is the third thing mentioned.

@dungpa
Copy link
Contributor

dungpa commented Jul 1, 2013

@dsyme @ovatsus Thanks for your compliments. I'm glad that the tool is useful. Just feel overwhelmed about the amount of work to be done.

@dungpa dungpa closed this as completed Jul 4, 2013
@halcwb
Copy link

halcwb commented Feb 15, 2019

Is this still supported for VS? Couldn't find it?

@dsyme
Copy link
Contributor

dsyme commented Nov 3, 2021

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

No branches or pull requests

6 participants