-
Notifications
You must be signed in to change notification settings - Fork 646
Conversation
@stamblerre, It will cover your contributions to all Microsoft-managed open source projects. |
src/goDeclaration.ts
Outdated
} | ||
}); | ||
let documentText = document.getText(); | ||
let documentArchive = document.fileName + '\n'; |
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.
you can use getFileArchive()
from util.ts
to do this
src/goDeclaration.ts
Outdated
@@ -39,8 +39,10 @@ export function definitionLocation(document: vscode.TextDocument, position: vsco | |||
// Assume it's > Go 1.5 | |||
if (toolForDocs === 'godoc' || (ver && (ver.major < 1 || (ver.major === 1 && ver.minor < 6)))) { | |||
return definitionLocation_godef(document, position, offset, includeDocs); | |||
} else if (toolForDocs == 'guru') { |
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.
There are linting errors that is breaking the build.
==
should be===
in line 42- There is a trailing space in line 45
@@ -43,7 +43,7 @@ export class GoSignatureHelpProvider implements SignatureHelpProvider { | |||
let funcName = declarationText.substring(0, nameEnd); | |||
sig = declarationText.substring(sigStart); | |||
si = new SignatureInformation(funcName + sig, res.doc); | |||
} else { | |||
} else if (res.toolUsed === 'gogetdoc') { |
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.
Both Signature Help and Hover Info features are currently broken.
Until guru
has the feature to provide docs, you can call godoc
to provide the docs.
Pull https://github.com/Microsoft/vscode-go/blob/1302fcf0f704f66c974e043258b7ed9783ba104b/src/goDeclaration.ts#L85-L105 out into a function and use it in both definitionLocation_godef
and definitionLocation_guru
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.
Latest changes should fix this - if guru is set as the docsTool, I just passed in a config object with "godoc" set as the docsTool for provideHover and provideSignatureHelp.
@stamblerre, |
Hey @stamblerre When using |
@ramya-rao-a: I haven't noticed any bugs being filed about it. I think the reason for null docs is because guru doesn't provide any docs for definitions, just the position information. |
Support guru as a tool that can be used for jumping to definitions.