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

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

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@romix
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@MaskRay

MaskRay Dec 25, 2017

Member

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.

Member

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)

This comment has been minimized.

@MaskRay

MaskRay Dec 25, 2017

Member

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

@MaskRay

MaskRay Dec 25, 2017

Member

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

This comment has been minimized.

@romix

romix Dec 25, 2017

Contributor

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

romix Dec 25, 2017

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@romix

romix Dec 25, 2017

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@MaskRay

MaskRay Dec 25, 2017

Member

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

Member

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 join this conversation on GitHub. Already have an account? Sign in to comment