File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -364,6 +364,9 @@ export default class BashServer {
364
364
symbol : LSP . SymbolInformation
365
365
currentUri : string
366
366
} ) : LSP . MarkupContent {
367
+ logger . debug (
368
+ `getDocumentationForSymbol: symbol=${ symbol . name } uri=${ symbol . location . uri } ` ,
369
+ )
367
370
const symbolUri = symbol . location . uri
368
371
const symbolStartLine = symbol . location . range . start . line
369
372
@@ -665,6 +668,9 @@ export default class BashServer {
665
668
Builtins . isBuiltin ( word ) ||
666
669
( this . executables . isExecutableOnPATH ( word ) && symbolsMatchingWord . length == 0 )
667
670
) {
671
+ logger . debug (
672
+ `onHover: getting shell documentation for reserved word or builtin or executable` ,
673
+ )
668
674
const shellDocumentation = await getShellDocumentation ( { word } )
669
675
if ( shellDocumentation ) {
670
676
return { contents : getMarkdownContent ( shellDocumentation , 'man' ) }
@@ -675,7 +681,11 @@ export default class BashServer {
675
681
currentUri,
676
682
} )
677
683
// do not return hover referencing for the current line
678
- . filter ( ( symbol ) => symbol . location . range . start . line !== params . position . line )
684
+ . filter (
685
+ ( symbol ) =>
686
+ symbol . location . uri !== currentUri ||
687
+ symbol . location . range . start . line !== params . position . line ,
688
+ )
679
689
. map ( ( symbol : LSP . SymbolInformation ) =>
680
690
this . getDocumentationForSymbol ( { currentUri, symbol } ) ,
681
691
)
You can’t perform that action at this time.
0 commit comments