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

LSP Mk II #3217

Merged
merged 26 commits into from
Sep 19, 2022
Merged

LSP Mk II #3217

merged 26 commits into from
Sep 19, 2022

Conversation

ChrisPenner
Copy link
Contributor

@ChrisPenner ChrisPenner commented Jul 11, 2022

asciicast

Overview

This adds the following features to the Mk I release:

Installation and setup

Currently the only supported configuration is to connect to the LSP via a specified port.

The default is 127.0.0.1:5757, but you can change the port using UNISON_LSP_PORT=1234.

I've got this configuration in my CocConfig for nvim, your setup may vary.

  "languageserver": {
    "unison": {
      "filetypes": ["unison"],
      "host": "127.0.0.1",
      "port": 5757
    }

Note that you'll need to start UCM before you try connecting to it in your editor or your editor might give up (fixed in VS code now 😄 )

For VSCode I believe we'll have to publish an npm package to make an extension.


This change is Reviewable

Base automatically changed from cp/lsp to trunk September 12, 2022 19:45
@@ -38,112 +24,19 @@ uToLspPos uPos =
uToLspRange :: Range.Range -> Range
uToLspRange (Range.Range start end) = Range (uToLspPos start) (uToLspPos end)

infoDiagnostics :: FileAnalysis -> Lsp [Diagnostic]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rather than analyze the notes from scratch each time for diagnostics, we should analyze the notes once and collect all the info we can from them. So most of this logic just moved to FileAnalysis.hs

@ChrisPenner ChrisPenner marked this pull request as ready for review September 13, 2022 16:22
@ChrisPenner ChrisPenner self-assigned this Sep 13, 2022
@aryairani aryairani merged commit ff2ec98 into trunk Sep 19, 2022
@aryairani aryairani deleted the cp/lsp-II branch September 19, 2022 18:30
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.

spurious errors in the ucm shell when hovering over whitespace in vscode
3 participants