Skip to content

Commit

Permalink
fix: mdoc language identifier (#943)
Browse files Browse the repository at this point in the history
* fix: mdoc language identifier

* Create lazy-masks-behave.md

---------

Co-authored-by: Erika <[email protected]>
  • Loading branch information
alexanderniebuhr and Princesseuh authored Aug 28, 2024
1 parent 99ec87f commit af5bbc5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .changeset/lazy-masks-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@astrojs/language-server": patch
"@astrojs/ts-plugin": patch
"astro-vscode": patch
---

Fixes content intellisense not working inside Markdoc files using the `markdoc` language identifier

2 changes: 1 addition & 1 deletion packages/language-server/src/core/frontmatterHolders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import type ts from 'typescript';
import type { URI } from 'vscode-uri';

export const SUPPORTED_FRONTMATTER_EXTENSIONS = { md: 'markdown', mdx: 'mdx', mdoc: 'mdoc' };
export const SUPPORTED_FRONTMATTER_EXTENSIONS = { md: 'markdown', mdx: 'mdx', mdoc: 'markdoc' };
export const SUPPORTED_FRONTMATTER_EXTENSIONS_KEYS = Object.keys(SUPPORTED_FRONTMATTER_EXTENSIONS);
const SUPPORTED_FRONTMATTER_EXTENSIONS_VALUES = Object.values(SUPPORTED_FRONTMATTER_EXTENSIONS);

Expand Down
2 changes: 1 addition & 1 deletion packages/ts-plugin/src/frontmatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@volar/language-core';
import type ts from 'typescript';

const SUPPORTED_FRONTMATTER_EXTENSIONS = { md: 'markdown', mdx: 'mdx', mdoc: 'mdoc' };
const SUPPORTED_FRONTMATTER_EXTENSIONS = { md: 'markdown', mdx: 'mdx', mdoc: 'markdoc' };
const SUPPORTED_FRONTMATTER_EXTENSIONS_KEYS = Object.keys(SUPPORTED_FRONTMATTER_EXTENSIONS);
const SUPPORTED_FRONTMATTER_EXTENSIONS_VALUES = Object.values(SUPPORTED_FRONTMATTER_EXTENSIONS);

Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<LabsIn
documentSelector: [
{ language: 'astro' },
...(hasContentIntellisense
? [{ language: 'markdown' }, { language: 'mdx' }, { language: 'mdoc' }]
? [{ language: 'markdown' }, { language: 'mdx' }, { language: 'markdoc' }]
: []),
],
initializationOptions,
Expand Down

0 comments on commit af5bbc5

Please sign in to comment.