LanguageServerProtocol icon indicating copy to clipboard operation
LanguageServerProtocol copied to clipboard

Generate types from meta model

Open TheAngryByrd opened this issue 2 years ago โ€ข 0 comments

WHAT

๐Ÿค– Generated by Copilot at 198ad18

This pull request improves the F# code formatting and testing of the language server protocol library. It updates the .editorconfig file, the test project, and the fantomas tool.

๐Ÿค– Generated by Copilot at 198ad18

fantomas renamed F# code gets formatted well Autumn of AST

๐Ÿ”ง๐Ÿ†™๐Ÿงช

WHY

Generates types from the metaModel provided by the LSP spec. Hopefully makes it so we don't have to hand roll as much and can stay up to date easier.

  • [x] Generate Structures
  • [x] Generate Enumerations
  • [x] Generate Type Aliases
  • [ ] Generate XML docs *1
  • [ ] Check serialization/deserialization

1. Currently their metaModel docs have some stuff but it's not as extensive as use manually copying the docs from the LSP spec page itself.

Maybes:

  • [ ] Generate Interfaces/Abstract classes for Requests
  • [ ] Generate Interfaces/Abstract classes for Notifications

HOW

๐Ÿค– Generated by Copilot at 198ad18

  • Rename fantomas-tool to fantomas in dotnet-tools.json to use latest version of F# formatter (link)
  • Update TargetFramework to net7.0 in tests/Ionide.LanguageServerProtocol.Tests.fsproj to use latest .NET SDK (link)
  • Add GenerateTests.fs to tests/Ionide.LanguageServerProtocol.Tests.fsproj to generate test cases for language server protocol messages (link)
  • Add Fabulous.AST package to tests/Ionide.LanguageServerProtocol.Tests.fsproj to work with abstract syntax trees in F# (link)
  • Remove fsharp_max_infix_operator_expression setting from .editorconfig to avoid formatting issues with fantomas (link)
  • Add new settings to .editorconfig to control formatting of brackets, blank lines, arrays, lists, and lambdas in F# (link)

TheAngryByrd avatar Jun 04 '23 19:06 TheAngryByrd