Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable formatting #364

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/tasty-geckos-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@mdx-js/language-service": patch
"@mdx-js/language-server": patch
"vscode-mdx": patch
---

Disable formatting
36 changes: 18 additions & 18 deletions packages/language-service/lib/language-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand All @@ -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
}
}

Expand All @@ -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
}
}

Expand Down Expand Up @@ -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
}
}
],
Expand Down Expand Up @@ -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
}
}
],
Expand All @@ -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
}
}
]
Expand Down
28 changes: 14 additions & 14 deletions packages/language-service/test/language-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -798,7 +798,7 @@ test('update virtual file', () => {
lengths: [19],
data: {
completion: true,
format: true,
format: false,
navigation: true,
semantic: true,
structure: true,
Expand Down
Loading