-
Notifications
You must be signed in to change notification settings - Fork 154
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
To interpolated string #1143
To interpolated string #1143
Conversation
I think this might come through on properties on a project https://github.com/fsharp/FsAutoComplete/blob/main/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs#L723 |
cfb20e1
to
63683f6
Compare
Yeah, this really makes sense. I didn't really get anywhere with your pointer, unfortunately. |
Ok gonna mark this as Request Changes |
bb9fae8
to
b1e193c
Compare
Tremendous thanks for adding support to detect the langversion @TheAngryByrd! |
Thanks a ton for this! |
Todo:
--langversion
to decide if this should be enabled or not.@TheAngryByrd how would one do that?
This first version has some limitations:
I think this is decent enough to throw out there and expand upon later.
WHAT
🤖 Generated by Copilot at cfb20e1
This pull request adds a new code fix that converts
sprintf
andprintf
calls to interpolated strings in F# 5. It updates the language server types to provide the code fix to clients and adds tests to verify its behavior. It also adds a new module and file to implement and test the code fix logic.🤖 Generated by Copilot at cfb20e1
🆕🛠️🧪
WHY
HOW
🤖 Generated by Copilot at cfb20e1
sprintf
andprintf
calls to interpolated strings (link, link, link, link, link)ToInterpolatedString
module insrc/FsAutoComplete/CodeFixes/ToInterpolatedString.fs
(link)ToInterpolatedString.fix
function to the list of code fixes that theAdaptiveFSharpLspServer
andFSharpLspServer
types can provide insrc/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs
andsrc/FsAutoComplete/LspServers/FsAutoComplete.Lsp.fs
(link, link)ToInterpolatedStringTests.tests
function to the list of tests that thetests
function runs intest/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs
(link)ToInterpolatedStringTests
module intest/FsAutoComplete.Tests.Lsp/CodeFixTests/ToInterpolatedStringTests.fs
(link)