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

dhall-lsp-server: Turn imports into clickable links #1121

Merged
merged 3 commits into from
Jul 17, 2019

Conversation

EggBaconAndSpam
Copy link
Collaborator

Note that remote imports were already clickable since they were recognised by VSCode as urls.

Frederik Ramcke added 2 commits July 16, 2019 16:06
Also modifies `localToPath` to return a relative path if the input was
relative, rather than resolving relative paths by appending the current
directory.
This implements a handler for 'Document Link' requests. As a result,
imports are now clickable!

Here -> do
Directory.getCurrentDirectory
return "."

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What was the rationale behind having localToPath return absolute paths in the first place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Never mind, I simply changed exprFromUncachedImport to call makeAbsolute on the resulting path, thus recovering the original behaviour.

Copy link
Collaborator

@Gabriella439 Gabriella439 left a comment

Choose a reason for hiding this comment

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

Awesome idea! 🙂

@mergify mergify bot merged commit 33ebf7e into master Jul 17, 2019
@mergify mergify bot deleted the frederik/lsp-document-link branch July 17, 2019 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants