Skip to content

VS support #3

Closed
Closed
@ovatsus

Description

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

Activity

dungpa

dungpa commented on Apr 15, 2013

@dungpa
Contributor

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

greenbutton commented on Apr 20, 2013

@greenbutton

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

dungpa commented on Apr 20, 2013

@dungpa
Contributor

@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

dungpa commented on Apr 26, 2013

@dungpa
Contributor

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

itowlson

itowlson commented on Apr 26, 2013

@itowlson
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

dungpa commented on Apr 26, 2013

@dungpa
Contributor

@itowlson Thanks. My priorities would be:

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

itowlson commented on Apr 27, 2013

@itowlson
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

dungpa commented on Apr 28, 2013

@dungpa
Contributor

@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

dungpa commented on May 11, 2013

@dungpa
Contributor

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

itowlson

itowlson commented on May 12, 2013

@itowlson
Contributor

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

dungpa

dungpa commented on May 17, 2013

@dungpa
Contributor

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

dungpa

dungpa commented on Jun 7, 2013

@dungpa
Contributor
itowlson

itowlson commented on Jun 7, 2013

@itowlson
Contributor

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

dungpa commented on Jun 7, 2013

@dungpa
Contributor

@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

ovatsus commented on Jul 1, 2013

@ovatsus
Author

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

9 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @halcwb@ovatsus@itowlson@dungpa@greenbutton

      Issue actions

        VS support · Issue #3 · fsprojects/fantomas