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: Fix LSP::LocationLink's not being returned within an array #629

Merged
merged 3 commits into from
Aug 31, 2023

Conversation

jansul
Copy link
Contributor

@jansul jansul commented Aug 19, 2023

This PR fixes the issue discussed in a previous PR.

Previously it was possible for the Mint's LS to return a single instance of LSP::LocationLink whereas the specification only allows these to be returned within an array (the result must be one of Location | Location[] | LocationLink[] | null)

VSCode and similar clients don't seem to mind this, but it would be nice to be within spec! 😅


I have also refactored the definition methods slightly so they are only dealing with LSP::LocationLink's. If these are not supported by the client, mapping to LSP::Location's is done in the main definition method.

This allowed me to remove server : Server as one of the parameters that had to be passed to each of these methods.

I haven't simplified the type signature of the main method as also mentioned in the previous PR. However it does now at least match the specification.

@gdotdesign gdotdesign requested a review from Sija August 21, 2023 10:01
@gdotdesign gdotdesign added enhancement New feature or request tooling Tooling related feature (formatter, documentation, production builder) labels Aug 21, 2023
@gdotdesign gdotdesign merged commit d554f7c into mint-lang:master Aug 31, 2023
2 checks passed
@Sija Sija added this to the 0.19.0 milestone Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tooling Tooling related feature (formatter, documentation, production builder)
Development

Successfully merging this pull request may close these issues.

3 participants