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

267
Vistas
Adding custom limited Javascript autocomplete set to Monaco editor with addExtraLib

I would like to limit the amount of suggestions Monaco gives me on default with plain Javascript. Things like autocompleting array object's properties such as length are welcome but anything related to DOM or CSS elements is not needed.

There's a Github issue reply that describes how this can be achieved in theory, but there's an issue ran into with the approach described in the link. The custom definitions for JS such as lib.es5.d.ts are so long that if I try to convert the whole definition to Javascript string and feed to Monaco through monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, libUri); function, Javascript crashes to RangeError: Maximum call stack size exceeded because the string containing the definitions is too long to process.

Is there a way to configure Monaco so that only lib.es5.d.ts definitions are being used with autocomplete, or perhaps some way around the too long string issue?

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

0

This was solved by using a webpack raw-loader to import the definitions as a js handle and then passing that handle to monaco.languages.typescript.javascriptDefaults.setExtraLibs(...) function appropriately. Many different definitions can be included this way.

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