Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
suggest: ISuggest
indexes: IIndexes,
} = initializationOptions;
const runtimepaths = runtimepath ? runtimepath.split(",") : [];
// config by user's initializationOptions
const conf: IConfig = {
iskeyword: iskeyword || "",
runtimepath: runtimepaths,
vimruntime: (vimruntime || "").trim(),
diagnostic: {
enable: true,
...(diagnostic || {}),
},
snippetSupport: shvl.get(param, "capabilities.textDocument.completion.completionItem.snippetSupport"),
suggest: {
fromRuntimepath: false,
fromVimruntime: true,
...(suggest || {}),
},
indexes: {
runtimepath: true,
gap: 100,
count: 1,
projectRootPatterns,
...(indexes || {}),
},
};
// init config
config.init(conf);
: paths.reduce(function(substate, path) {
return shvl.set(substate, path, shvl.get(state, path));
}, {});
}
function subscriber(store) {
return function(handler) {
return store.subscribe(handler);
};
}
if (!canWriteStorage(storage)) {
throw new Error("Invalid storage instance given");
}
const savedState = shvl.get(options, "getState", getState)(key, storage);
return function(store) {
if (typeof savedState === "object" && savedState !== null) {
store.replaceState(
merge(store.state, savedState, {
arrayMerge:
options.arrayMerger ||
function(store, saved) {
return saved;
},
clone: false
})
);
(options.rehydrated || function() {})(store);
}
: paths.reduce(function(substate, path) {
return shvl.set(substate, path, shvl.get(state, path));
}, {});
}