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

158
Vistas
Sublime Text Emmet JSX selfClosingStyle

Hello I use latest Sublime Text 4 with Emmet and reactjs source with build in Syntax -> Javasript > JSX and it work.

I change default emmet setting "jsx_prefix": true, to false, and it work - now I can expand tags without <.

But i want change default expand Component/ -> <Component> to <Component />

I try change "markup_style": "html", to xhtml or xml but it not work.

And in emmet setting i can see this param, which maybe can solve my problem:

    // See `GlobalConfig` interface for supported properties: https://github.com/emmetio/emmet/blob/master/src/config.ts
    // Example:
    // "config": {
    //  "markup": {
    //      "snippets": {
    //          "foo": "foo.bar>baz"
    //      },
    //      "options": {
    //          "output.selfClosingStyle": "xhtml"
    //      }
    //  }
    // }
    "config": {},

Because I don't know TS, I can't read source in GitHub to solve this, can anyone know how to use this config param not for one snippet as in example, but for JSX with "output.selfClosingStyle": "xhtml"?

I try write something like this(but not work):

"config": {
        "markup": "jsx",
        "options": {
            "output.selfClosingStyle": "xhtml"
        }
    }

Help me to use JSX self closing tags with emmet in ST4 pls.

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

0

In Sublime Text, you can specify config either globally for syntax type (markup or stylesheet) or for specific syntax.

Syntaxes are listed in syntax_scopes option of Emmet config, which is a mapping of syntax name to Sublime Text internal scope (you can create your own syntaxes like this as well).

In your case, you should specify config for jsx syntax, like this:

{
    "config": {
        "jsx": {
            "options": {
                "output.selfClosingStyle": "xhtml"
            }   
        }
    }
}

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