Merge pull request #320 from Luna1996/master

[bug-fix]hover struct field not show docs.
This commit is contained in:
Alexandros Naskos 2021-05-07 12:27:25 +03:00 committed by GitHub
commit 3d62dd53a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
# Zig magic stuff # Zig magic stuff
/zig-cache /zig-cache
/zig-out
debug debug
release release

View File

@ -41,6 +41,7 @@ pub fn getDocComments(
.global_var_decl, .global_var_decl,
.aligned_var_decl, .aligned_var_decl,
.simple_var_decl, .simple_var_decl,
.container_field_init,
=> { => {
if (getDocCommentTokenIndex(tokens, base)) |doc_comment_index| if (getDocCommentTokenIndex(tokens, base)) |doc_comment_index|
return try collectDocComments(allocator, tree, doc_comment_index, format, false); return try collectDocComments(allocator, tree, doc_comment_index, format, false);