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

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

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 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