mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 09:08:53 +01:00
Add drop/paste resource for css (#221612)
* New drop and paste providers that create a url function snippet * added url pasting feature * added url pasting feature * added url pasting feature * Target just dropping/pasting resources for now * Move files * Remove unused strings * Removing more unused logic for now * Remove tsconfig change * Remove doc file * Capitalize * Remove old proposal names --------- Co-authored-by: Meghan Kulkarni <kulkarni.meg@gmail.com> Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { getNodeFSRequestService } from './nodeFs';
|
||||
import { ExtensionContext, extensions, l10n } from 'vscode';
|
||||
import { startClient, LanguageClientConstructor } from '../cssClient';
|
||||
import { ServerOptions, TransportKind, LanguageClientOptions, LanguageClient, BaseLanguageClient } from 'vscode-languageclient/node';
|
||||
import { TextDecoder } from 'util';
|
||||
|
||||
import { ExtensionContext, extensions, l10n } from 'vscode';
|
||||
import { BaseLanguageClient, LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } from 'vscode-languageclient/node';
|
||||
import { LanguageClientConstructor, startClient } from '../cssClient';
|
||||
import { getNodeFSRequestService } from './nodeFs';
|
||||
import { registerDropOrPasteResourceSupport } from '../dropOrPaste/dropOrPasteResource';
|
||||
|
||||
let client: BaseLanguageClient | undefined;
|
||||
|
||||
@@ -37,6 +37,8 @@ export async function activate(context: ExtensionContext) {
|
||||
process.env['VSCODE_L10N_BUNDLE_LOCATION'] = l10n.uri?.toString() ?? '';
|
||||
|
||||
client = await startClient(context, newLanguageClient, { fs: getNodeFSRequestService(), TextDecoder });
|
||||
|
||||
context.subscriptions.push(registerDropOrPasteResourceSupport({ language: 'css', scheme: '*' }));
|
||||
}
|
||||
|
||||
export async function deactivate(): Promise<void> {
|
||||
@@ -45,3 +47,4 @@ export async function deactivate(): Promise<void> {
|
||||
client = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user