ChimeHQ / LanguageClient

Language Server Protocol (LSP) client for Swift
BSD 3-Clause "New" or "Revised" License
94 stars 10 forks source link

Expose ServerInfo #17

Closed FastestMolasses closed 10 months ago

FastestMolasses commented 10 months ago

Hello, I'm working on adding LSP support to CodeEdit. Can we get this ServerInfo struct exposed when initializing a server? It's great information to have for logging. Thanks!

mattmassicotte commented 10 months ago

Great idea, and thanks so much for making the PR! I totally forgot about the ServerInfo structure and had to look it up to even figure out what it was!

It got me thinking, I believe we can simplify a lot of this by just storing the InitializationResponse instead of destructuring it first and storing the fields. That's my bad design. I don't think fixing that internally is necessary, but I do think it's worthwhile fixing the publicly-facing API to reduce client churn.

mattmassicotte commented 10 months ago

Oh, and I'm thrilled to see you starting on this work! Please do not be shy about questions! Also, there's been a lot of change to this repo in the last little while, and I anticipate more...

FastestMolasses commented 10 months ago

Agreed, made the change.

Oh, and I'm thrilled to see you starting on this work! Please do not be shy about questions! Also, there's been a lot of change to this repo in the last little while, and I anticipate more...

Sounds great!

mattmassicotte commented 10 months ago

This is a fantastic change, and you cleaned up all the internals too! Great stuff, thank you!