0

I'm developing Qwik app in VSCode, there are some special Qwik attributes, for example: q:slot and bind:value. However, when I do format, the editor auto add space after colon, so they become: q: slot and bind: value.

My question is, is there any setting to ignore format attributes like that? I'm currently using the default TypeScript and JavaScript Language Features

When I have a code like this, and I format with the default TypeScript and JavaScript Language Features

<div q:slot="heading">
{heading}
</div>

However, the editor splits q: and slot so the code became:

<div q: slot="heading">
{heading}
</div>

It should not split q: and slot

Tan Nguyen
  • 1,636
  • 1
  • 12
  • 9

1 Answers1

1

this issue is really similar to this one https://github.com/tailwindlabs/tailwindcss/discussions/6284

I tried many TypeScript and JavaScript Language Features configurations without any success. e.g. disable all javascript.format.insertSpace* and typescript.format.insertSpaceA* configs

Btw you can use prettier because it's so good https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

Giorgio Boa
  • 341
  • 4
  • Ahh, tried prettier but no luck, the problem came from latest VSCode with prettier here. https://github.com/prettier/prettier-vscode/issues/3020 – Tan Nguyen Jun 14 '23 at 22:45
  • it's strange because, I have VSCode Version: 1.79.0 and Prettier v9.13.0 and it's working fine – Giorgio Boa Jun 15 '23 at 06:36