-
Notifications
You must be signed in to change notification settings - Fork 131
Feature comment docs onhover #234
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
Merged
skovhus
merged 12 commits into
bash-lsp:master
from
nikita-skobov:feature-comment-docs-onhover
May 15, 2020
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6dc709e
Add feature to show comment documentation onHover
nikita-skobov 68a15ff
Follow style guide
nikita-skobov 95f7f2d
Adds testing fixture comment-doc-on-hover.sh
nikita-skobov 5938cc1
Updates FIXTURE_FILES_MATCHING_GLOB
nikita-skobov a7ccdd3
Updates onHover test with case for comment doc feature
nikita-skobov 55643e7
Adds test for commentsAbove in analyser.ts
nikita-skobov 35b49bf
Changes result set length to 8
nikita-skobov dae023f
Updates commentsAbove to strip leading whitespace
nikita-skobov fb307c2
Adds more test cases for commentsAbove in analyzer
nikita-skobov 8905da4
Follows style guide
nikita-skobov 0b3210a
Adds helper function to onHover for comment-doc formatting
nikita-skobov 1e35af1
Uses seperate test case for onHover documentation
nikita-skobov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
# this is a comment | ||
# describing the function | ||
# hello_world | ||
# this function takes two arguments | ||
hello_world() { | ||
echo "hello world to: $1 and $2" | ||
} | ||
|
||
|
||
|
||
# if the user hovers above the below hello_world invocation | ||
# they should see the comment doc string in a tooltip | ||
# containing the lines 4 - 7 above | ||
|
||
hello_world "bob" "sally" | ||
|
||
|
||
|
||
# doc for func_one | ||
func_one() { | ||
echo "func_one" | ||
} | ||
|
||
# doc for func_two | ||
# has two lines | ||
func_two() { | ||
echo "func_two" | ||
} | ||
|
||
|
||
# this is not included | ||
|
||
# doc for func_three | ||
func_three() { | ||
nikita-skobov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "func_three" | ||
} | ||
|
||
|
||
# works for variables | ||
my_var="pizza" | ||
|
||
|
||
my_other_var="no comments above me :(" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm wondering if we should call this
findRelatedComment
. More precise as it only returns a comment for when we find a match above the function/variable.