-
Notifications
You must be signed in to change notification settings - Fork 93
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
Document link should work with limited file extensions or file size #391
Comments
It seems reasonable. The only thing that I may add is to allow users to customize the set of file extensions. |
Or we could limit the file size of a link because there are too many text file types that should be provided a link (e.g. python, matlab, julia, c++ code files). And we could use Document Link Resolve Request to check the file size so that it could determine if a link should be provided. |
Instead of a whitelist, we could have a blacklist of extensions, (pdf, jpeg, exe, dll, etc). Though limiting file size seems reasonable. |
It makes sense. However, in vscode, user could associate these file extensions with different editor extensions, e.g. vscode-pdf could open pdf in a WebView in vscode, hex editor could view and edit any binary file, and vscode could natively view image files such as png, etc, etc. and svg extension could preview svg as well. |
I guess we could first avoid supplying a large file to the editor and leave handling different file formats to the editor at the moment. |
Currently, the document link provider will capture all existing file paths in the document to provide links. Some file paths are binary data files (e.g.
*.fst
) rather than source files (*.R
) or text-data files (e.g.*.csv
). Accidentally following the link of data binary data file is not useful (the editor cannot handle the file type) or sometimes makes the editor freeze (via remote-ssh).I think we should use an option to provide links to a limited collection of file extensions. By default, it might include R, csv, log, txt, etc.
The text was updated successfully, but these errors were encountered: