-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Upgrade to lsp-1.0 #1284
Upgrade to lsp-1.0 #1284
Conversation
/cc @bubba |
ecf402c
to
8108dbc
Compare
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.
Just did a quick scan, but so far makes a lot of sense. Did ghcide use a reactor style channel beforehand?
-> WithProgressFunc | ||
-> WithIndefiniteProgressFunc | ||
initialise :: Rules () | ||
-> Maybe (LSP.LanguageContextEnv Config) |
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.
Hiding the LSP functionality into LanguageContextEnv is exactly what I had in mind 👍
The major changes introduced by this PR are now pretty much ready, here is a summary: lsp-1.0
For a summary of the changes, see the release notes on https://github.com/alanz/lsp/releases/tag/1.0.0.0 For an example of the concrete differences introduced due to this API, consider the In the old version, this is its type: request :: (ToJSON params, FromJSON a) => ClientMethod -> params -> Session (ResponseMessage a) To use this function, the user had to guess the correct type of Using request :: SClientMethod m -> MessageParams m -> Session (ResponseMessage m)
Changes in
|
While there is still some work to be done on this, all the major changes are in, so I would appreciate reviews on the general API and direction of the PR |
Also, if anyone wants to help with porting the HLS testsuite, please feel free to reach out. I believe it would be a good exercise to familiarize yourself with the new |
Another (maybe helpful) tip for people reviewing the changes, especially to the notifications: ignore white-space changes, that makes a diff a lot less scary |
da71cd7
to
1adb8cf
Compare
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.
As discussed, let's land this ASAP and deal with bugs/issues later. Dependencies need to be all in Hackage for that though
I plan to build all my future work on top of this branch so please avoid rewriting the history (just squash merge at the end)
FWIW, I have been running with it for the last few days, and seems solid. Plus my tree-sitter version is based on it, and I have not seen anything dire while investigating behaviour for that. |
This involved a signficant rework of all LSP interaction and
hls-plugin-api
TODO
lsp
,lsp-test
lsp-test
automatically respond to "progress create" and "apply edit" requests.executeCommand