Open ZaneMiller opened 7 years ago
can you give some source browser examples?
Stash for example expects the line number as a hash with no extra information, i.e. http://my-stash-instance.com/projects/foo/repos/bar/browse/src/file.ts#25
However I can see many potential use cases where the format would not include a hash but rather a query parameter (my-repo.com/src/file.ts?line=25
) or even as part of the URL (my-repo.com/src/file.ts/25
).
I would see this working in the JSON configuration using a replacement pattern:
// config.json
{
"pattern": "^modules/module-one",
"replace": "https://www.your-repository.org/${fileName}#${lineNumber}"
}
This would allow for greater flexibility when doing replacements to cover a wider range of use cases.
VSCode uses a different format. It would be really neat to support this for local documentation.
vscode://file/{full_fs_path_to_src}/{local_path}:{line_number}
Since full_fs_path_to_src is likely to change between users, it would be really neat to have both a repository link and a "view in editor" link.
Currently the line number of a type definition is hard coded to be
#L{line-number}
in the generated URL. This should be able to be configured either on the command-line or in the configuration JSON to support source browsers that expect this information in a different URL format.