Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
Binary file removed extensions/vscode/images/split-editors.png
Binary file not shown.
2 changes: 0 additions & 2 deletions extensions/vscode/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
} from 'reactive-vscode';
import * as vscode from 'vscode';
import { config } from './lib/config';
import { activate as activateSplitEditors } from './lib/splitEditors';

let client: lsp.BaseLanguageClient | undefined;

Expand Down Expand Up @@ -71,7 +70,6 @@ export const { activate, deactivate } = defineExtension(async () => {

activateAutoInsertion(selectors, client);
activateDocumentDropEdit(selectors, client);
activateSplitEditors(client);
}, { immediate: true });

useCommand('vue.action.restartServer', async () => {
Expand Down
68 changes: 1 addition & 67 deletions extensions/vscode/lib/generated-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ export const extensionId = `${publisher}.${name}`;
/**
* Type union of all commands
*/
export type CommandKey =
| 'vue.action.restartServer'
| 'vue.action.splitEditors';
export type CommandKey = 'vue.action.restartServer';

/**
* Commands map registed by `Vue.volar`
Expand All @@ -25,11 +23,6 @@ export const commands = {
* @value `vue.action.restartServer`
*/
actionRestartServer: 'vue.action.restartServer',
/**
* %command.action.splitEditors%
* @value `vue.action.splitEditors`
*/
actionSplitEditors: 'vue.action.splitEditors',
} satisfies Record<string, CommandKey>;

/**
Expand All @@ -38,9 +31,6 @@ export const commands = {
export type ConfigKey =
| 'vue.trace.server'
| 'vue.server.includeLanguages'
| 'vue.splitEditors.icon'
| 'vue.splitEditors.layout.left'
| 'vue.splitEditors.layout.right'
| 'vue.codeActions.askNewComponentName'
| 'vue.complete.casing.tags'
| 'vue.complete.casing.props'
Expand All @@ -60,9 +50,6 @@ export type ConfigKey =
export interface ConfigKeyTypeMap {
'vue.trace.server': 'off' | 'messages' | 'verbose';
'vue.server.includeLanguages': string[];
'vue.splitEditors.icon': boolean;
'vue.splitEditors.layout.left': string[];
'vue.splitEditors.layout.right': string[];
'vue.codeActions.askNewComponentName': boolean;
'vue.complete.casing.tags': 'autoKebab' | 'autoPascal' | 'kebab' | 'pascal';
'vue.complete.casing.props': 'autoKebab' | 'autoCamel' | 'kebab' | 'camel';
Expand Down Expand Up @@ -90,9 +77,6 @@ export interface ConfigKeyTypeMap {
export interface ConfigShorthandMap {
traceServer: 'vue.trace.server';
serverIncludeLanguages: 'vue.server.includeLanguages';
splitEditorsIcon: 'vue.splitEditors.icon';
splitEditorsLayoutLeft: 'vue.splitEditors.layout.left';
splitEditorsLayoutRight: 'vue.splitEditors.layout.right';
codeActionsAskNewComponentName: 'vue.codeActions.askNewComponentName';
completeCasingTags: 'vue.complete.casing.tags';
completeCasingProps: 'vue.complete.casing.props';
Expand All @@ -113,9 +97,6 @@ export interface ConfigShorthandMap {
export interface ConfigShorthandTypeMap {
traceServer: 'off' | 'messages' | 'verbose';
serverIncludeLanguages: string[];
splitEditorsIcon: boolean;
splitEditorsLayoutLeft: string[];
splitEditorsLayoutRight: string[];
codeActionsAskNewComponentName: boolean;
completeCasingTags: 'autoKebab' | 'autoPascal' | 'kebab' | 'pascal';
completeCasingProps: 'autoKebab' | 'autoCamel' | 'kebab' | 'camel';
Expand Down Expand Up @@ -167,33 +148,6 @@ export const configs = {
key: 'vue.server.includeLanguages',
default: ['vue'],
} as ConfigItem<'vue.server.includeLanguages'>,
/**
* @key `vue.splitEditors.icon`
* @default `false`
* @type `boolean`
*/
splitEditorsIcon: {
key: 'vue.splitEditors.icon',
default: false,
} as ConfigItem<'vue.splitEditors.icon'>,
/**
* @key `vue.splitEditors.layout.left`
* @default `["script","scriptSetup","styles"]`
* @type `array`
*/
splitEditorsLayoutLeft: {
key: 'vue.splitEditors.layout.left',
default: ['script', 'scriptSetup', 'styles'],
} as ConfigItem<'vue.splitEditors.layout.left'>,
/**
* @key `vue.splitEditors.layout.right`
* @default `["template","customBlocks"]`
* @type `array`
*/
splitEditorsLayoutRight: {
key: 'vue.splitEditors.layout.right',
default: ['template', 'customBlocks'],
} as ConfigItem<'vue.splitEditors.layout.right'>,
/**
* @key `vue.codeActions.askNewComponentName`
* @default `true`
Expand Down Expand Up @@ -334,9 +288,6 @@ export const configs = {
export interface ScopedConfigKeyTypeMap {
'trace.server': 'off' | 'messages' | 'verbose';
'server.includeLanguages': string[];
'splitEditors.icon': boolean;
'splitEditors.layout.left': string[];
'splitEditors.layout.right': string[];
'codeActions.askNewComponentName': boolean;
'complete.casing.tags': 'autoKebab' | 'autoPascal' | 'kebab' | 'pascal';
'complete.casing.props': 'autoKebab' | 'autoCamel' | 'kebab' | 'camel';
Expand Down Expand Up @@ -366,9 +317,6 @@ export const scopedConfigs = {
defaults: {
'trace.server': 'off',
'server.includeLanguages': ['vue'],
'splitEditors.icon': false,
'splitEditors.layout.left': ['script', 'scriptSetup', 'styles'],
'splitEditors.layout.right': ['template', 'customBlocks'],
'codeActions.askNewComponentName': true,
'complete.casing.tags': 'autoPascal',
'complete.casing.props': 'autoKebab',
Expand All @@ -395,13 +343,6 @@ export interface NestedConfigs {
'server': {
'includeLanguages': string[];
};
'splitEditors': {
'icon': boolean;
'layout': {
'left': string[];
'right': string[];
};
};
'codeActions': {
'askNewComponentName': boolean;
};
Expand Down Expand Up @@ -452,13 +393,6 @@ export interface NestedScopedConfigs {
'server': {
'includeLanguages': string[];
};
'splitEditors': {
'icon': boolean;
'layout': {
'left': string[];
'right': string[];
};
};
'codeActions': {
'askNewComponentName': boolean;
};
Expand Down
111 changes: 0 additions & 111 deletions extensions/vscode/lib/splitEditors.ts

This file was deleted.

47 changes: 1 addition & 46 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"sponsor": {
"url": "https://github.com/sponsors/johnsoncodehk"
},
"icon": "images/icon.png",
"icon": "icon.png",
"displayName": "Vue (Official)",
"description": "Language Support for Vue",
"author": "johnsoncodehk",
Expand Down Expand Up @@ -251,34 +251,6 @@
],
"markdownDescription": "%configuration.server.includeLanguages%"
},
"vue.splitEditors.icon": {
"type": "boolean",
"default": false,
"markdownDescription": "%configuration.splitEditors.icon%"
},
"vue.splitEditors.layout.left": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"script",
"scriptSetup",
"styles"
],
"markdownDescription": "%configuration.splitEditors.layout.left%"
},
"vue.splitEditors.layout.right": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"template",
"customBlocks"
],
"markdownDescription": "%configuration.splitEditors.layout.right%"
},
"vue.codeActions.askNewComponentName": {
"type": "boolean",
"default": true,
Expand Down Expand Up @@ -394,12 +366,6 @@
"command": "vue.action.restartServer",
"title": "%command.action.restartServer%",
"category": "Vue"
},
{
"command": "vue.action.splitEditors",
"title": "%command.action.splitEditors%",
"category": "Vue",
"icon": "images/split-editors.png"
}
],
"menus": {
Expand Down Expand Up @@ -439,17 +405,6 @@
{
"command": "typescript.removeUnusedImports",
"when": "supportedCodeAction =~ /(\\s|^)source\\.removeUnusedImports\\b/ && editorLangId =~ /^vue$/"
},
{
"command": "vue.action.splitEditors",
"when": "editorLangId == vue"
}
],
"editor/title": [
{
"command": "vue.action.splitEditors",
"when": "resourceLangId == vue && config.vue.splitEditors.icon",
"group": "navigation"
}
]
}
Expand Down
10 changes: 0 additions & 10 deletions packages/language-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
forEachEmbeddedCode,
getDefaultCompilerOptions,
isReferencesEnabled,
parse,
} from '@vue/language-core';
import {
createLanguageService,
Expand Down Expand Up @@ -204,15 +203,6 @@ connection.onInitialized(server.initialized);

connection.onShutdown(server.shutdown);

connection.onRequest('vue/parseSfc', (params: {
textDocument: TextDocumentIdentifier;
}) => {
const document = server.documents.get(URI.parse(params.textDocument.uri));
if (document) {
return parse(document.getText());
}
});

connection.onRequest('vue/interpolationRanges', async (params: {
textDocument: TextDocumentIdentifier;
}): Promise<[number, number][]> => {
Expand Down