Skip to content

Conversation

@kattouf
Copy link
Contributor

@kattouf kattouf commented Apr 17, 2025

Hello! I noticed some issues with the library’s public API. I guess this is a consequence of the library’s past use in a mono-repo (with LanguageClient), and maybe also because some entities haven’t been used yet at all

Problem:

Some of public entities have public let properties and haven't public init constructors, that makes impossible to create and fill them outside library scope.

Solution:

I have added initializers for all the public LSP protocol entities I found (even those with var properties).

P.S.

I also ran ./run-swift-format.sh and added changes in second commit

@mattmassicotte
Copy link
Contributor

Wow, thank you so much!

The reason this happened is that many LSP types only need to be created on servers. I'm aware of a few server implementations that are based on this library, and they have driven a lot of the need for initializers. But they are pretty rare compared to clients.

@mattmassicotte mattmassicotte merged commit 3443a4d into ChimeHQ:main Apr 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants