mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-10-04 07:38:27 +03:00
5c7443c344
VS Code is adding support for running extensions in a nodeless environment. This PR tries to refactor the code a bit to allow later on replacing node APIs (fs, child_process) with shims. This PR should not change any functionality for running Vim in desktop. Once we can run Vim in a web worker, we can also think about running Vim in its own worker, which at the end will help with the performance issue: https://github.com/microsoft/vscode/issues/65876
30 lines
944 B
TypeScript
30 lines
944 B
TypeScript
/**
|
|
* Extension.ts is a lightweight wrapper around ModeHandler. It converts key
|
|
* events to their string names and passes them on to ModeHandler via
|
|
* handleKeyEvent().
|
|
*/
|
|
import './src/actions/include-main';
|
|
import './src/actions/include-plugins';
|
|
|
|
/**
|
|
* Load configuration validator
|
|
*/
|
|
|
|
import './src/configuration/validators/inputMethodSwitcherValidator';
|
|
import './src/configuration/validators/remappingValidator';
|
|
import './src/configuration/validators/neovimValidator';
|
|
import './src/configuration/validators/vimrcValidator';
|
|
|
|
import * as vscode from 'vscode';
|
|
import { activate as activateFunc } from './extensionBase';
|
|
import { Globals } from './src/globals';
|
|
|
|
export { getAndUpdateModeHandler } from './extensionBase';
|
|
|
|
export async function activate(context: vscode.ExtensionContext) {
|
|
// Set the storage path to be used by history files
|
|
Globals.extensionStoragePath = context.globalStoragePath;
|
|
|
|
activateFunc(context);
|
|
}
|