fantomas-tools icon indicating copy to clipboard operation
fantomas-tools copied to clipboard

[Feature Request] Copy Oak as valid F# Code

Open jkone27 opened this issue 1 year ago • 2 comments

Would be of great benefit i think to be able to directly copy F# code instead of copying a string and trying to mimic manually?

image

the Oak view is not valid F# code so devs cannot copy paste it as is, it would be great to do so, or alternatively have a utility function to convers such strings to oak code


module OakUtils = 
    // string -> Oak
    let FromToolSring str = ...

jkone27 avatar Jan 05 '25 18:01 jkone27

Hmm, I guess, any reason you are not using https://edgarfgp.github.io/Fabulous.AST/

Bottomline, are you interested in contributing this feature?

nojaf avatar Jan 05 '25 19:01 nojaf

ah yes now i get , so apart from formatting the string and Fabulous.AST are equivalent (mostly removing range and adding parentheses or having constructor invoked correctly, nice! might be interesting to try to implement it indeed, but i am still quite a beginner :)

jkone27 avatar Jan 06 '25 19:01 jkone27