Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Enable TypeDefinition Requests #1169

Merged
merged 1 commit into from
Apr 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Haskell/Ide/Engine/Transport/LspStdio.hs
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,7 @@ hieOptions :: [T.Text] -> Core.Options
hieOptions commandIds =
def { Core.textDocumentSync = Just syncOptions
, Core.completionProvider = Just (J.CompletionOptions (Just True) (Just ["."]))
, Core.typeDefinitionProvider = Just (J.GotoOptionsStatic True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is J.GotoOptionsStatic True the right thing?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I looked the haskell-lsp docs and was none the wiser afterwards.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I know that the protocol allows to pass a link instead of a file as response, which would be nice for hoogle packages. Should we look into this?

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 would that entail?
What do you mean with hoogle packages? Documentation?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I’ll investigate a bit more, I think it would entail showing the local Html page build with haddock or potentially a link to the haddock page for the type, which we can get from hoogle

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This would also be interesting for findDefinition.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also, if it worked project wide, but I think, this is a different problem.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would expect the typedefinitionprovider flag to be set only if there is a handler for the gototypedefinition request, rather than having to be set explicitly.

So there may be a shortcoming in haskell-lsp.

-- As of 2018-05-24, vscode needs the commands to be registered
-- otherwise they will not be available as codeActions (will be
-- silently ignored, despite UI showing to the contrary).
Expand Down