Skip to content
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

Bump lsp versions #4052

Merged
merged 3 commits into from
Feb 8, 2024
Merged

Bump lsp versions #4052

merged 3 commits into from
Feb 8, 2024

Conversation

michaelpj
Copy link
Collaborator

@michaelpj michaelpj commented Feb 5, 2024

Broadly:

  • A few places where we need to pipe ProgressTokens around.
  • Some changes to the registration options we infer
  • A few places where we need to adapt to ignoring registrations or not
  • Adapting to use the ghcide verison of getCompletionPrefix everywhere
  • Adapting to use the new mixed rope format

@@ -207,7 +209,7 @@ splitAtPosition pos ls = do
split <- splitFile
pure $ reverse $ Rope.lines $ fst split
where
splitFile = Rope.splitAtPosition ropePos ls
splitFile = Rope.utf16SplitAtPosition ropePos ls
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I set this up right, but I'm not 100% sure. We would need a cabal file test with unicode characters...

@michaelpj
Copy link
Collaborator Author

I also haven't taken advantage of the fact that we now get an updater that lets us send text-only updates from withIndefiniteProgress.

@@ -28,6 +28,7 @@ tests = testGroup "watched files"
[ testSession' "workspace files" $ \sessionDir -> do
liftIO $ writeFile (sessionDir </> "hie.yaml") "cradle: {direct: {arguments: [\"-isrc\", \"A\", \"WatchedFilesMissingModule\"]}}"
_doc <- createDoc "A.hs" "haskell" "{-#LANGUAGE NoImplicitPrelude #-}\nmodule A where\nimport WatchedFilesMissingModule"
setIgnoringRegistrationRequests False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says "don't pretend that registerCapability and unregisterCapability messages don't exist", which we mostly want to otherwise it adds more noise. This test actually looks at those messages so needs to set this.

Copy link
Collaborator

@jhrcek jhrcek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one nitpick.

hls-plugin-api/src/Ide/Types.hs Show resolved Hide resolved
Copy link
Collaborator

@soulomoon soulomoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Broadly:
- A few places where we need to pipe `ProgressToken`s around.
   - I also just removed the progress reporting from resolve commands,
     since it's going to often be costly to do progress reporting on
     something that short. Possibly we could revisit after haskell/lsp#549
- Some changes to the registration options we infer
- A few places where we need to adapt to ignoring registrations or not
- Adapting to use the ghcide verison of `getCompletionPrefix` everywhere
- Adapting to use the new mixed rope format
@michaelpj michaelpj merged commit 0b0eee3 into master Feb 8, 2024
37 of 39 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.

None yet

4 participants