-
Notifications
You must be signed in to change notification settings - Fork 217
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
Improve LSP experience outside VSCode #1587
Comments
@jvanbruegge: I'm seeing something very different when I get a type error, although I'm testing against |
No, you are seeing the same thing, but in VSCode you can scroll over that huge chunk of text. The vim client does not have scrolling |
@jvanbruegge: Oh, I didn't even realize that the Dhall language server worked at all with Vim! I know that in principle a language server should be able to support any editor that supports the language server protocol, but one issue that @EggBaconAndSpam ran into while designing the language server was that in practice language servers still requires some editor-side "glue" so we focused primarily on ironing out integration issues with VSCode. In order to help you with your configuration I'm going to need as much detail on the following so I can reproduce your setup:
I probably won't be able to help that much (since I'm not really an expert on customizing |
I use
My full configuration can be found in my dotfiles repo |
From what I can tell what does not work is configuration (the language server seems to ignore the |
Oh, yeah for some reason hints and error do not necessarily show up at the correct spot, for example |
On the plus side, import completion and autocomplete works (albeit when working with dhall-kubernetes, autocomplete takes about 5 seconds to show up) EDIT: Oh, and formatting works like a charm |
I'm just documenting here that this also requires installing:
... in case somebody else makes the same mistake I did |
@jvanbruegge: |
Yes, but wouldnt it be better to just remove that huge chunk of unneccesary text? |
... as requested by @jvanbruegge Fixes #1587 We already include the source range so that language server clients can highlight the affected code. Consequently, the diagnostic message doesn't need to include the text of the source span.
Fix is up here: #1604 Here is what the full diagnostic message looks like now in |
nice |
As a side note, this change also removes the terminal escape codes around the "Error:" in the error message, too |
... as requested by @jvanbruegge Fixes #1587 We already include the source range so that language server clients can highlight the affected code. Consequently, the diagnostic message doesn't need to include the text of the source span.
I am currently trying the LSP and sadly the diagnostics are unhelpful at best and annoying at worst. For example, I forgot to add
.Type
to an imported expression. This is the error I got:This looks like it is just the normal command line error squeezed into one line. When I run the interpreter in a command line window, the information I actually needed to see my mistake was at the very bottom:
(On a side note, I don't see the use in the huge output on the cli too but there I can simply ignore it)
On the annoying side are a ton of parse errors à la
Unexpected end of input, expected ...
. Also those errors somehow persist until I save the file again.The text was updated successfully, but these errors were encountered: