How to use the cspell-lib.mergeSettings function in cspell-lib

To help you get started, we’ve selected a few cspell-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github streetsidesoftware / vscode-spell-checker / packages / _server / src / documentSettings.ts View on Github external
private async fetchUriSettings(uri: string): Promise {
        log('Start fetchUriSettings:', uri);
        const folder = await this.findMatchingFolder(uri);
        const folderSettings = await this.fetchSettingsForUri(folder.uri);
        const spellSettings = CSpell.mergeSettings(this.defaultSettings, this.importedSettings(), folderSettings.settings);
        const fileUri = Uri.parse(uri);
        const fileSettings = CSpell.calcOverrideSettings(spellSettings, fileUri.fsPath);
        log('Finish fetchUriSettings:', uri);
        return fileSettings;
    }
github streetsidesoftware / vscode-spell-checker / packages / _server / src / server.ts View on Github external
async function getBaseSettings(doc: TextDocument) {
        const settings = await getActiveSettings(doc);
        return {...CSpell.mergeSettings(defaultSettings, settings), enabledLanguageIds: settings.enabledLanguageIds};
    }