<commit_before>import * as vscode from 'vscode';
import { findResourceFormat } from './autocompletion/model';
import { getConfiguration } from './configuration';
import { Index } from './index';

export class DocumentLinkProvider implements vscode.DocumentLinkProvider {
    constructor(private index: Index) { }

    provideDocumentLinks(document: vscode.TextDocument, token: vscode.CancellationToken): vscode.ProviderResult<vscode.DocumentLink[]> {
        let index = this.index.getOrIndexDocument(document, { exclude: getConfiguration().indexing.exclude });<commit_msg>DocumentLinkProvider: Use IndexLocator instead of Index<commit_after>import * as vscode from 'vscode';
import { findResourceFormat } from './autocompletion/model';
import { getConfiguration } from './configuration';
import { Index } from './index';
import { IndexLocator } from './index/index-locator';

export class DocumentLinkProvider implements vscode.DocumentLinkProvider {
    constructor(private indexLocator: IndexLocator) { }

    provideDocumentLinks(document: vscode.TextDocument, token: vscode.CancellationToken): vscode.ProviderResult<vscode.DocumentLink[]> {
        let index = this.indexLocator.getIndexForDoc(document).getOrIndexDocument(document, { exclude: getConfiguration().indexing.exclude });
{'fraction_non_alphanumeric': 0.1110248447204969, 'fraction_numerical': 0.0, 'mean_word_length': 6.121546961325967, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '876369', 'n_tokens_mistral': 340, 'n_tokens_neox': 339, 'n_words': 79}