-
Notifications
You must be signed in to change notification settings - Fork 212
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] Initial support for textDocument/hover request #1922
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! A few comments so far.
@@ -593,6 +593,13 @@ std::string ReferencesRequest(absl::string_view file, int id, int line, | |||
line, character); | |||
} | |||
|
|||
// Creates a textDocument/hover request | |||
std::string HoverRequest(absl::string_view file, int id, int line, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the id
actually a relevant value we need to pass for the tests ? If not maybe we just replace it with some static constexpr int kDummyId = 1;
to not distract from the other values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be unique per request - we can go with the static value that is incremented per request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, but is any place even checking if it is unique per request ?
3f53a4b
to
fbeeed8
Compare
…ol_table header Method SymbolMetaTypeAsString is now provided by header to allow printing symbol meta types, e.g. for hover purposes Signed-off-by: Grzegorz Latosinski <[email protected]>
…ding definitions and tokens To be able to use FindDefinitionLocation in other use cases than goto-definition, the parameters are now of type TextDocumentPositionParams. Also, GetTokenAtTextDocumentPosition now returns optional TokenInfo instead of absl::string_view, to provide more useful information regarding the symbol. Signed-off-by: Grzegorz Latosinski <[email protected]>
…g SymbolTableNode with definition Signed-off-by: Grzegorz Latosinski <[email protected]>
…content builder Signed-off-by: Grzegorz Latosinski <[email protected]>
…s to Language Server Signed-off-by: Grzegorz Latosinski <[email protected]>
… for hovering over symbol Signed-off-by: Grzegorz Latosinski <[email protected]>
Signed-off-by: Grzegorz Latosinski <[email protected]>
…publicly available Signed-off-by: Grzegorz Latosinski <[email protected]>
Signed-off-by: Grzegorz Latosinski <[email protected]>
…er on "end" Signed-off-by: Grzegorz Latosinski <[email protected]>
Signed-off-by: Grzegorz Latosinski <[email protected]>
fbeeed8
to
18c4071
Compare
…e hover is applied, added using dedicated class Signed-off-by: Grzegorz Latosinski <[email protected]>
Signed-off-by: Grzegorz Latosinski <[email protected]>
18c4071
to
79ce3d0
Compare
Resolves #1187
This PR adds initial support for
textDocument/hover
request.It adds a HoverBuilder that constructs hover messages for the current position.
Tasks:
end
endmodule
,endfunction
of block (currently WIP)textDocument/hover
method (currently WIP)