This pull request refactors and improves some parts of the FsAutoComplete core and LSP server modules, especially related to error handling, type conversions, and option types. It also adds a new test case for the inline hints feature and cleans up some whitespace in the test project file. The main files affected are Commands.fs, ParseAndCheckResults.fs, AdaptiveFSharpLspServer.fs, Common.fs, InlineHintsTests.fs, and FsAutoComplete.Tests.Lsp.fsproj.
π€ Generated by Copilot at 683625a
The server for F# LSPGot some refactoring to seeResult to optionAnd error adoptionWith better formatting and speed
π οΈππ§Ή
WHY
Because proper modelling and handling of various program states is important (and the hack session was fun!)
HOW
π€ Generated by Copilot at 683625a
Simplify the return types of TryGetToolTip and TryGetToolTipEnhanced from Result to option and add logging for the cases when no tooltip is found ( link, link, link, link, link, link, link, link)
Replace the Result.ofStringErr function with the Result.lineLookupErr function, which formats the error message using the ErrorMsgUtils.formatLineLookErr function, and add comments for the candidates for a better error model (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
Remove the unnecessary conversions of the result type to a CoreResponse type in Commands.fs and AdaptiveServerState.fs (link, link, link)
Simplify the expressions by removing the Option.ofResult function in Commands.fs (link, link)
Add a new file InlineHintsTests.fs, which defines a test case for the inline hints feature of the server (link, link)
Remove some empty lines and line breaks from the project file FsAutoComplete.Tests.Lsp.fsproj (link, link)
Co-authored-by: Jimmy Byrd TheAngryByrd@users.noreply.github.com
WHAT
π€ Generated by Copilot at 683625a
This pull request refactors and improves some parts of the FsAutoComplete core and LSP server modules, especially related to error handling, type conversions, and option types. It also adds a new test case for the inline hints feature and cleans up some whitespace in the test project file. The main files affected are
Commands.fs
,ParseAndCheckResults.fs
,AdaptiveFSharpLspServer.fs
,Common.fs
,InlineHintsTests.fs
, andFsAutoComplete.Tests.Lsp.fsproj
.π€ Generated by Copilot at 683625a
π οΈππ§Ή
WHY
Because proper modelling and handling of various program states is important (and the hack session was fun!)
HOW
π€ Generated by Copilot at 683625a
Commands.fs
andAdaptiveServerState.fs
(link, link, link)Commands.fs
(link, link)InlineHintsTests.fs
, which defines a test case for the inline hints feature of the server (link, link)FsAutoComplete.Tests.Lsp.fsproj
(link, link)