volar-service-markdown 0.0.65 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +8 -8
  3. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type DocumentSelector, type LanguageServicePlugin, type ProviderResult, type LanguageServiceContext } from '@volar/language-service';
1
+ import { type DocumentSelector, type LanguageServiceContext, type LanguageServicePlugin, type ProviderResult } from '@volar/language-service';
2
2
  import type { TextDocument } from 'vscode-languageserver-textdocument';
3
3
  import type { DiagnosticOptions, IMdLanguageService } from 'vscode-markdown-languageservice';
4
4
  export interface Provide {
package/index.js CHANGED
@@ -61,13 +61,13 @@ function create({ documentSelector = ['markdown'], fileExtensions = [
61
61
  level: vscode_markdown_languageservice_1.LogLevel.Off,
62
62
  log(_logLevel, message) {
63
63
  context.env.console?.log(message);
64
- }
64
+ },
65
65
  };
66
66
  const parser = {
67
67
  slugifier: vscode_markdown_languageservice_1.githubSlugifier,
68
68
  async tokenize(document) {
69
- return await md.parse(document.getText(), {});
70
- }
69
+ return md.parse(document.getText(), {});
70
+ },
71
71
  };
72
72
  const workspace = getMarkdownWorkspace();
73
73
  const mdLs = (0, vscode_markdown_languageservice_1.createLanguageService)({
@@ -90,7 +90,7 @@ function create({ documentSelector = ['markdown'], fileExtensions = [
90
90
  fileWatcher?.dispose();
91
91
  },
92
92
  provide: {
93
- 'markdown/languageService': () => mdLs
93
+ 'markdown/languageService': () => mdLs,
94
94
  },
95
95
  provideCodeActions(document, range, context, token) {
96
96
  if (prepare(document)) {
@@ -128,7 +128,7 @@ function create({ documentSelector = ['markdown'], fileExtensions = [
128
128
  const items = await mdLs.getCompletionItems(document, position, {}, token);
129
129
  return {
130
130
  isIncomplete: false,
131
- items
131
+ items,
132
132
  };
133
133
  }
134
134
  },
@@ -215,7 +215,7 @@ function create({ documentSelector = ['markdown'], fileExtensions = [
215
215
  },
216
216
  async resolveDocumentLink(link, token) {
217
217
  return await mdLs.resolveDocumentLink(link, token) ?? link;
218
- }
218
+ },
219
219
  };
220
220
  function prepare(document) {
221
221
  if (matchDocument(documentSelector, document)) {
@@ -280,7 +280,7 @@ function create({ documentSelector = ['markdown'], fileExtensions = [
280
280
  onDidCreateMarkdownDocument: onDidCreateMarkdownDocument.event,
281
281
  onDidDeleteMarkdownDocument: onDidDeleteMarkdownDocument.event,
282
282
  async openMarkdownDocument(resource) {
283
- return await getTextDocument(resource);
283
+ return getTextDocument(resource);
284
284
  },
285
285
  async readDirectory(resource) {
286
286
  const directory = await fs?.readDirectory(resource) ?? [];
@@ -288,7 +288,7 @@ function create({ documentSelector = ['markdown'], fileExtensions = [
288
288
  .filter(file => file[1] !== 0)
289
289
  .map(([fileName, fileType]) => [
290
290
  fileName,
291
- { isDirectory: fileType === 2 }
291
+ { isDirectory: fileType === 2 },
292
292
  ]);
293
293
  },
294
294
  async stat(resource) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volar-service-markdown",
3
- "version": "0.0.65",
3
+ "version": "0.0.67",
4
4
  "description": "Integrate vscode-markdown-languageservice into Volar",
5
5
  "homepage": "https://github.com/volarjs/services/tree/master/packages/markdown",
6
6
  "bugs": "https://github.com/volarjs/services/issues",
@@ -41,5 +41,5 @@
41
41
  "optional": true
42
42
  }
43
43
  },
44
- "gitHead": "f0253f4f3e3b0b0f1a453f99b354eb9feaec38cd"
44
+ "gitHead": "7bf732781fe5900fbe0be87e993b5a74bc939aff"
45
45
  }