planbcoding/vscode-react-refactor

Plugin subscription on wrong file types

Opened this issue · 0 comments

Jule- commented

Isn't it an extension for JSX? Why enable it for .js and .ts files?

export const activate = (context: vscode.ExtensionContext) => {
context.subscriptions.push(
vscode.languages.registerCodeActionsProvider(
{ pattern: "**/*.{js,jsx,ts,tsx}", scheme: "file" },
new CodeActionProvider()
)
);

At least, if you have reason to do so, could you provide a setting in order to change that? It would be nice!

VSCode is getting slower and slower while adding extensions and working with typescript on large projects, so I think this is vital to not overcharge VSCode routines when it comes to completion and stuff in files where it is not needed. I noticed that issue because VSCode was hanging on a pure .ts file save action with the name of this extension.

Thanks for your work! 😉