Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

220
Vistas
how to fold by line number in a VS Code Extension?

I am trying to create simple extension for vs code that need to collapse specific cells

I found this option

vscode.commands.executeCommand('editor.fold', fold={levels: 1, selectionLines: lines});

but I cant figure out how to set it to collapse one line (the start of the cell) how to create the selectionLines argument? (Or a better solution) [there is some extensions that uses editor.foldLevels, editor.foldAll and I can't find the docs for it]

The api: https://code.visualstudio.com/api/references/commands

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Solved it!

you need to do:

vscode.commands.executeCommand('editor.fold', {selectionLines: [lineNumber]});
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda