From 07bb38f29764437af9a616a737c26b83a1ad3419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Hameau?= Date: Fri, 24 Nov 2023 01:14:44 +0100 Subject: [PATCH] [INTERNAL] cleanup code and comments --- src/languageFeatures/documentLinks.ts | 2 +- src/languageFeatures/pathCompletions.ts | 4 ++-- src/test/pathCompletion.test.ts | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/languageFeatures/documentLinks.ts b/src/languageFeatures/documentLinks.ts index de76289..4c95541 100644 --- a/src/languageFeatures/documentLinks.ts +++ b/src/languageFeatures/documentLinks.ts @@ -372,7 +372,7 @@ export class TextileLinkComputer { ...inlineLinks, // Disabled for Textile : ...this.getReferenceLinks(document, noLinkRanges.concatInline(inlineLinks.map(x => x.source.range))), ...this.getLinkDefinitions(document, noLinkRanges), - // FIXME for Textile : ...this.getAutoLinks(document, noLinkRanges), + // Disabled for Textile : ...this.getAutoLinks(document, noLinkRanges), ]); const definitionSet = new LinkDefinitionSet(allLinks); return allLinks.map((link) => this.toReferenceLink(link, definitionSet)); diff --git a/src/languageFeatures/pathCompletions.ts b/src/languageFeatures/pathCompletions.ts index b4f141a..8438747 100644 --- a/src/languageFeatures/pathCompletions.ts +++ b/src/languageFeatures/pathCompletions.ts @@ -18,10 +18,10 @@ enum CompletionContextKind { Link, /** `[...][|]` */ - ReferenceLink, + ReferenceLink, // Not relevant for Textile /** `[]: |` */ - LinkDefinition, // TODO: not implemented + LinkDefinition, } interface AnchorContext { diff --git a/src/test/pathCompletion.test.ts b/src/test/pathCompletion.test.ts index e0f8b14..61fe87d 100644 --- a/src/test/pathCompletion.test.ts +++ b/src/test/pathCompletion.test.ts @@ -47,11 +47,6 @@ function assertCompletionsEqual(actual: readonly vscode.CompletionItem[], expect suite('Textile: Path completions', () => { // -- Begin : changed for textile - setup(async () => { - // These tests assume that the textile completion provider is already registered - await vscode.extensions.getExtension('gehdoc.vscode-textile-preview')!.activate(); - }); - test('Should not return anything when triggered in empty doc', async () => { const completions = await getCompletionsAtCursor(workspacePath('new.textile'), `${CURSOR}`); assertCompletionsEqual(completions, []);