Vim/extensionWeb.ts
Peng Lyu c900a7eaa8
Nodeless entry for Vim extension (#5130)
Add a new entry for running Vim in nodeless environment and load platform-specific modules based on the target.

This PR includes changes to:
- fs. In node, it's node's native fs; in nodeless, it uses vscode.workspace.fs.
- historyFile. In node, it stores the history in file system; in nodeless, it stores in memory.
- logger. In node, it uses winson; in nodeless, it uses browser console.
- lastly, it relies on Webpack to tree shake unwanted code paths (for example, remove nvim related code paths from the bundle in nodeless environment).
2020-09-20 13:57:38 -04:00

23 lines
697 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';
/**
* Load configuration validator
*/
import './src/configuration/validators/inputMethodSwitcherValidator';
import './src/configuration/validators/remappingValidator';
import './src/configuration/validators/vimrcValidator';
import * as vscode from 'vscode';
import { activate as activateFunc } from './extensionBase';
export { getAndUpdateModeHandler } from './extensionBase';
export async function activate(context: vscode.ExtensionContext) {
activateFunc(context, false);
}