Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

229
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda