• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

112
Vistas
VS code snippets for salesforce

I am trying to create some vs code snippets for aura and LWC(Salesforce specific languages) so I created one snippet file for javascript now it works in both the languages but is there a way I can restrict JS and html snippets to LWC only or also can someone please confirm how to create snippets for .cmp and .app files to be used on aura HTML, below is my js snippet which works in all sorts of js files and I and trying to restrict it to just lwc

  "Print to console": {
    "scope": "javascript",
    "prefix": "gss",
    "body": [
        "console.log('$1');",
        "$2"
    ],
    "description": "Log output to console"

I tried using when

"when": "editorTextFocus && !editorReadonly && resourceExtname =~ /\\.cmp/"

But it says

Property when is not allowed.

about 3 years ago · Juan Pablo Isaza
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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda