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

WIP: Serialize decl comments and use them in GetHoverForSymbol #183

Closed
wants to merge 2 commits into from

Conversation

romix
Copy link
Contributor

@romix romix commented Dec 24, 2017

This is a work in progress to support indexing of comments and to add documentation for declarations when displaying the hover information.

This PR tries to address #29

@MaskRay
Copy link
Contributor

MaskRay commented Dec 25, 2017

How about adding a command line option / config to decide whether the comments field should be used? I'm concerned that this may increase cacheDirectories size much.

const std::string &detailed_name) {
// TODO: Properly format multi-line comments.
std::string hover_string = comments;
if (hover)
Copy link
Contributor

@MaskRay MaskRay Dec 25, 2017

Choose a reason for hiding this comment

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

The unconditional newline may be undesired in Emacs lsp-mode and LanguageClient-neovim .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'm planning to return two strings as a response for the hover request. One for the formatted comment and one for the actual description/signature.

Both returned strings are lsMarkedString strings, i.e. markup strings. The comment string should have the markup type "text". The description/signature string should have the markup type "c++" to be properly rendered.

@romix
Copy link
Contributor Author

romix commented Dec 25, 2017

As for a command line option / config to decide whether the comments field should be used: Yes, we could introduce such an option. On the other hand, the comments are stored just for declarations, not for anything else. So, it is not clear if it would significantly increase the index size.

@MaskRay
Copy link
Contributor

MaskRay commented Dec 25, 2017

Merged with string comments changed to optional<string> in 2952755

@MaskRay MaskRay closed this Dec 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants