Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99112

Pre-opening a file in vscode language server

$
0
0

I have a custom filesystem provider in my extension and a language client+server. The custom fsprovider is actually simulating a filesystem, since all the files and directories are not on the drive and are fetched from backend.

I am having issues with providing goto-definition for it.

The issue is that when goto-definition is executed (ctrl+click on a word in file) the language server fetches the request, successfully finds the required uri for the referred file and returns it, but the file is not yet loaded in and thus it throws 'Unable to open filename: Unable to read file filename'.

After that, executing goto-definition on the same word the second time will successfully open the file since it was loaded in by now.

Is there a way to pre-open/load file in language server before returning the file location link?


Viewing all articles
Browse latest Browse all 99112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>