Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
Accessing a closed file with the help of Visual Studio Code

I am currently building automation of a vs code extension and the extension basically works on hover action (registerHoverProvider method). Since this method only works when the file that you are hovering on is open inside the editor, I cannot make use of it. For me, the use case is to work on a file that is currently not open inside the editor and pass it along. Any suggestions on how I can do that?

Current code:

vscode.languages.registerHoverProvider([{ scheme: 'file', language: 'typescript' }, { scheme: 'file', language: 'javascript' }], {
        provideHover: async (document, position) => {

// Some code here

}

On the above code, I want to change this in such a way that the function works on the document and position parameters without the registerHoverProvider method. I can give the file path as an input and that should be the document/file to be read.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

By default, VSCode opens files in preview mode. This is indicated by their name being italic in the menu bar. As John noted, you can double click on the file to fully open it.

To disable this behavior, try setting:

"workbench.editor.enablePreview": false

also Ctrl+P -- For targetting a file Alt+Enter -- For Opening that file into next tab

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!