-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
wider default fsharp_max_value_binding_width, also take width of pattern of binding into account #1936
Closed
Closed
wider default fsharp_max_value_binding_width, also take width of pattern of binding into account #1936
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a193424
Upgrade to FCS 40 (#1856)
nojaf c1a97df
Add release notes for 4.6.0-alpha-001.
nojaf daaf40c
Style guide lambda (#1858)
nojaf 2decf2c
Add release notes for 4.6.0-alpha-002.
nojaf f460762
Update records indent from the curly brace (#1892)
nojaf 3fda5d4
Add release notes for 4.6.0-alpha-003.
nojaf ad41943
Format out of process (#1845)
nojaf b7de991
Don't add a newline if there are no additional arguments before lambd…
nojaf 33ed998
Set DOTNET_CLI_UI_LANGUAGE to en-us when running dotnet tool command.…
nojaf 8f00ea8
Update FCS to 41.0.0-preview.21472.3 (#1927)
nojaf e4a18aa
Add release notes for 4.6.0-alpha-005.
nojaf d460b53
integrate to 4.6!
dsyme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Fantomas Daemon mode | ||
|
||
## Introduction | ||
|
||
As part of the `4.6` release, we've introduced a new feature where end-user can control the version of Fantomas that is being used inside an IDE. | ||
In previous iterations, the editor tooling would typically reference the [Fantomas](https://www.nuget.org/packages/Fantomas) or [Fantomas.Extras](https://www.nuget.org/packages/Fantomas.Extras) nuget package and use the [CodeFormatter](../src/Fantomas/CodeFormatter.fsi) api to handle formatting. | ||
The major drawback of this approach is that shared [FCS](https://www.nuget.org/packages/FSharp.Compiler.Service/) dependency needed to be exactly the same. | ||
So the editor is in control of which version of Fantomas is being used. | ||
Each version of Fantomas theoretically can have a different outcome as the style guides may have changed over time. | ||
|
||
## Solution | ||
|
||
To tackle this problem, we introduce two new concepts: `--daemon` mode for the [fantomas-tool](https://www.nuget.org/packages/fantomas-tool) and [Fantomas.Client](https://www.nuget.org/packages/Fantomas.Client). | ||
`--daemon` would launch the commandline application as a sort of [LSP server](https://microsoft.github.io/language-server-protocol/) and `Fantomas.Client` could connect to this and proxy format requests. | ||
Editor tooling would be able to launch your pinned version of `fantomas-tool` as a daemon service and interact with it outside-of-process. | ||
|
||
## End-user impact | ||
|
||
End-users don't have to worry about `Fantomas.Client` or the `--daemon` flag. They only need to install a compatible version of `fantomas-tool`. | ||
Be it locally or globally. The first compatible version is `4.6.0-alpha-004`, all higher version should work as well. | ||
Local versions have precedence over the global version. | ||
|
||
The nice thing about this approach is that you can upgrade Fantomas at your own pace. | ||
When new versions drop, you can dedicate a separate commit in source control and it won't interfere with your other commits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
| ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26124.0 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31825.309 | ||
MinimumVisualStudioVersion = 15.0.26124.0 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{B570C54C-2FEA-4A94-A8C5-FD4157A94DE7}" | ||
ProjectSection(SolutionItems) = preProject | ||
paket.dependencies = paket.dependencies | ||
EndProjectSection | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas", "src\Fantomas\Fantomas.fsproj", "{7EA16279-A5F1-4781-A343-4375A04BCE6F}" | ||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fantomas", "src\Fantomas\Fantomas.fsproj", "{7EA16279-A5F1-4781-A343-4375A04BCE6F}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this mean? Or did this happen automatically by VS? |
||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas.Tests", "src\Fantomas.Tests\Fantomas.Tests.fsproj", "{DED76E41-B89F-47BA-84C5-3AB0BECFA767}" | ||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fantomas.Tests", "src\Fantomas.Tests\Fantomas.Tests.fsproj", "{DED76E41-B89F-47BA-84C5-3AB0BECFA767}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas.CoreGlobalTool", "src\Fantomas.CoreGlobalTool\Fantomas.CoreGlobalTool.fsproj", "{DC08805B-C6E2-43F3-B381-E60EE88A079D}" | ||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fantomas.CoreGlobalTool", "src\Fantomas.CoreGlobalTool\Fantomas.CoreGlobalTool.fsproj", "{DC08805B-C6E2-43F3-B381-E60EE88A079D}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas.CoreGlobalTool.Tests", "src\Fantomas.CoreGlobalTool.Tests\Fantomas.CoreGlobalTool.Tests.fsproj", "{DEDE6968-0BE8-4415-9262-8355B82AF2C0}" | ||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fantomas.CoreGlobalTool.Tests", "src\Fantomas.CoreGlobalTool.Tests\Fantomas.CoreGlobalTool.Tests.fsproj", "{DEDE6968-0BE8-4415-9262-8355B82AF2C0}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas.Benchmarks", "src\Fantomas.Benchmarks\Fantomas.Benchmarks.fsproj", "{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}" | ||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fantomas.Benchmarks", "src\Fantomas.Benchmarks\Fantomas.Benchmarks.fsproj", "{B6BC63D5-410D-4DBB-9D45-5638F20BD09B}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas.Extras", "src\Fantomas.Extras\Fantomas.Extras.fsproj", "{4088FF76-1DB7-4E68-80FE-E851CE6701AC}" | ||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fantomas.Extras", "src\Fantomas.Extras\Fantomas.Extras.fsproj", "{4088FF76-1DB7-4E68-80FE-E851CE6701AC}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{29F22904-C9E0-40AA-B971-9AE377C17F59}" | ||
ProjectSection(SolutionItems) = preProject | ||
docs\Documentation.md = docs\Documentation.md | ||
docs\Formatting-Elmish-code.md = docs\Formatting-Elmish-code.md | ||
docs\FormattingConventions.md = docs\FormattingConventions.md | ||
docs\index.html = docs\index.html | ||
EndProjectSection | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas.Client", "src\Fantomas.Client\Fantomas.Client.fsproj", "{AA895F94-CCF2-4FCF-A9BB-E16987B57535}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
|
@@ -29,9 +39,6 @@ Global | |
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{7EA16279-A5F1-4781-A343-4375A04BCE6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7EA16279-A5F1-4781-A343-4375A04BCE6F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
|
@@ -105,7 +112,23 @@ Global | |
{4088FF76-1DB7-4E68-80FE-E851CE6701AC}.Release|x64.Build.0 = Release|Any CPU | ||
{4088FF76-1DB7-4E68-80FE-E851CE6701AC}.Release|x86.ActiveCfg = Release|Any CPU | ||
{4088FF76-1DB7-4E68-80FE-E851CE6701AC}.Release|x86.Build.0 = Release|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Debug|x64.Build.0 = Debug|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Debug|x86.Build.0 = Debug|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Release|x64.ActiveCfg = Release|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Release|x64.Build.0 = Release|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Release|x86.ActiveCfg = Release|Any CPU | ||
{AA895F94-CCF2-4FCF-A9BB-E16987B57535}.Release|x86.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {DEBFC920-A647-4859-890D-B59793D27594} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Member bindings will look at two settings currently.
Example.