mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
34489a2494
This commit adds the following: - Syntax builder scripts to make syntaxes easier to read and edit - Syntax highlight in single quote attributes - Syntax highlight for slot props - Basic syntax highlight for xpaths - Added `Switch Below` command This commit fixes the following: - Using `Switch Besides` or `Switch Below` does not open a new panel if one was already open - Fixed missing space in component's snippet indentation
21 lines
1.3 KiB
TypeScript
21 lines
1.3 KiB
TypeScript
import * as vscode from 'vscode';
|
|
import { Search } from './search';
|
|
import { ComponentDefinitionProvider } from './definiton_providers';
|
|
import { OpenDirection } from './utils';
|
|
|
|
export async function activate(context: vscode.ExtensionContext) {
|
|
const search = new Search();
|
|
|
|
context.subscriptions.push(vscode.commands.registerCommand('owl-vision.switch', () => search.switch()));
|
|
context.subscriptions.push(vscode.commands.registerCommand('owl-vision.switch-besides', () => search.switch(OpenDirection.Besides)));
|
|
context.subscriptions.push(vscode.commands.registerCommand('owl-vision.switch-below', () => search.switch(OpenDirection.Below)));
|
|
context.subscriptions.push(vscode.commands.registerCommand('owl-vision.find-component', () => search.findComponentCommand()));
|
|
context.subscriptions.push(vscode.commands.registerCommand('owl-vision.find-template', () => search.findTemplateCommand()));
|
|
|
|
const componentDefProvider = new ComponentDefinitionProvider(search);
|
|
context.subscriptions.push(vscode.languages.registerDefinitionProvider({ language: 'xml' }, componentDefProvider));
|
|
context.subscriptions.push(vscode.languages.registerDefinitionProvider({ language: 'javascript' }, componentDefProvider));
|
|
}
|
|
|
|
export function deactivate() { }
|