Repository: mdx-js/mdx-analyzer (js)

Issue:
MDX VS Code extension auto-formatting is indenting tags and removing text (may be IntelliSense issue)
### Initial checklist

- [X] I read the [support docs](https://mdxjs.com/community/support/)
- [X] I read the [contributing guide](https://mdxjs.com/community/contribute/)
- [X] I agree to follow the [code of conduct](https://github.com/mdx-js/.github/blob/HEAD/code-of-conduct.md)
- [X] I searched [issues](https://github.com/search?q=user%3Amdx-js&type=Issues) and couldn’t find anything (or linked relevant results below)

### Affected packages and versions

1.5

### Link to runnable example

_No response_

### Steps to reproduce

**With the "Enable experimental IntelliSense support for MDX files." checked/enabled**, the MDX extension is turning code like this:

```
<If cond={props.something === 'whatever'}>

### blah blah

</If>
```

into this...

```
      <If cond={props.something === 'whatever'}>



      </If>
```

So it's indenting the if statement for some reason AND more importantly it's removing the content within the tags.

### Expected behavior

It shouldn't be indenting and seriously shouldn't be removing code :)

### Actual behavior

See above.

### Runtime

_No response_

### Package manager

_No response_

### OS

macOS

### Build and bundle tools

_No response_

Pull request description:
Disable formatting
### Initial checklist

*   [x] I read the support docs <!-- https://github.com/unifiedjs/.github/blob/main/support.md -->
*   [x] I read the contributing guide <!-- https://github.com/unifiedjs/.github/blob/main/contributing.md -->
*   [x] I agree to follow the code of conduct <!-- https://github.com/unifiedjs/.github/blob/main/code-of-conduct.md -->
*   [x] I searched issues and couldn’t find anything (or linked relevant results below) <!-- https://github.com/search?q=user%3Aunifiedjs&type=Issues -->
*   [x] If applicable, I’ve added docs and tests

### Description of changes

Formatting embedded content causes too much unexpected behaviour in MDX files.

Closes #355

<!--do not edit: pr-->


Patch:
diff --git a/.changeset/tasty-geckos-obey.md b/.changeset/tasty-geckos-obey.md
new file mode 100644
index 0000000..417f4ca
--- /dev/null
+++ b/.changeset/tasty-geckos-obey.md
@@ -0,0 +1,7 @@
+---
+"@mdx-js/language-service": patch
+"@mdx-js/language-server": patch
+"vscode-mdx": patch
+---
+
+Disable formatting
diff --git a/packages/language-service/lib/language-module.js b/packages/language-service/lib/language-module.js
index d2d11bc..a6b2d39 100644
--- a/packages/language-service/lib/language-module.js
+++ b/packages/language-service/lib/language-module.js
@@ -115,12 +115,12 @@ function getVirtualFiles(fileName, snapshot, ts, processor) {
     generatedOffsets: [],
     lengths: [],
     data: {
-      verification: true,
       completion: true,
-      semantic: true,
+      format: false,
       navigation: true,
+      semantic: true,
       structure: true,
-      format: true
+      verification: true
     }
   }
 
@@ -134,12 +134,12 @@ function getVirtualFiles(fileName, snapshot, ts, processor) {
     generatedOffsets: [],
     lengths: [],
     data: {
-      verification: true,
       completion: true,
-      semantic: true,
+      format: false,
       navigation: true,
+      semantic: true,
       structure: true,
-      format: true
+      verification: true
     }
   }
 
@@ -153,12 +153,12 @@ function getVirtualFiles(fileName, snapshot, ts, processor) {
     generatedOffsets: [],
     lengths: [],
     data: {
-      verification: true,
       completion: true,
-      semantic: true,
+      format: false,
       navigation: true,
+      semantic: true,
       structure: true,
-      format: true
+      verification: true
     }
   }
 
@@ -233,12 +233,12 @@ function getVirtualFiles(fileName, snapshot, ts, processor) {
                 generatedOffsets: [0],
                 lengths: [node.value.length],
                 data: {
-                  verification: true,
                   completion: true,
-                  semantic: true,
+                  format: true,
                   navigation: true,
+                  semantic: true,
                   structure: true,
-                  format: true
+                  verification: true
                 }
               }
             ],
@@ -410,12 +410,12 @@ export function getLanguageModule(ts, plugins) {
             generatedOffsets: [0],
             lengths: [length],
             data: {
-              verification: true,
               completion: true,
-              semantic: true,
+              format: true,
               navigation: true,
+              semantic: true,
               structure: true,
-              format: true
+              verification: true
             }
           }
         ],
@@ -433,12 +433,12 @@ export function getLanguageModule(ts, plugins) {
           generatedOffsets: [0],
           lengths: [length],
           data: {
-            verification: true,
             completion: true,
-            semantic: true,
+            format: true,
             navigation: true,
+            semantic: true,
             structure: true,
-            format: true
+            verification: true
           }
         }
       ]


Test patch:
diff --git a/packages/language-service/test/language-module.js b/packages/language-service/test/language-module.js
index cd71226..437c3a7 100644
--- a/packages/language-service/test/language-module.js
+++ b/packages/language-service/test/language-module.js
@@ -49,7 +49,7 @@ test('create virtual file w/ mdxjsEsm', () => {
             lengths: [34],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -86,7 +86,7 @@ test('create virtual file w/ mdxjsEsm', () => {
             lengths: [1],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -141,7 +141,7 @@ test('create virtual file w/ mdxFlowExpression', () => {
             lengths: [9],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -177,7 +177,7 @@ test('create virtual file w/ mdxFlowExpression', () => {
             lengths: [1],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -239,7 +239,7 @@ test('create virtual file w/ mdxJsxFlowElement w/ children', () => {
             lengths: [9, 8],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -279,7 +279,7 @@ test('create virtual file w/ mdxJsxFlowElement w/ children', () => {
             lengths: [48, 1],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -334,7 +334,7 @@ test('create virtual file w/ mdxJsxFlowElement w/o children', () => {
             lengths: [7],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -373,7 +373,7 @@ test('create virtual file w/ mdxJsxFlowElement w/o children', () => {
             lengths: [1],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -428,7 +428,7 @@ test('create virtual file w/ mdxJsxTextElement', () => {
             lengths: [7],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -464,7 +464,7 @@ test('create virtual file w/ mdxJsxTextElement', () => {
             lengths: [2, 1],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -519,7 +519,7 @@ test('create virtual file w/ mdxTextExpression', () => {
             lengths: [9],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -555,7 +555,7 @@ test('create virtual file w/ mdxTextExpression', () => {
             lengths: [4, 5],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -695,7 +695,7 @@ test('create virtual file w/ yaml frontmatter', () => {
             lengths: [27],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,
@@ -798,7 +798,7 @@ test('update virtual file', () => {
             lengths: [19],
             data: {
               completion: true,
-              format: true,
+              format: false,
               navigation: true,
               semantic: true,
               structure: true,