Skip to content

Commit 42baeca

Browse files
committed
add and update method
1 parent 1f1376e commit 42baeca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/remix-ide/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ class AppComponent {
703703
// Set workspace after initial activation
704704
this.appManager.on('editor', 'editorMounted', () => {
705705
// Preload prettier and plugins to improve first-format performance
706-
this.appManager.call('codeFormatter', 'preload').catch((e) => {
706+
this.appManager.call('codeFormatter', 'preloadPrettier').catch((e) => {
707707
console.log('Failed to preload code formatter:', e)
708708
})
709709

apps/remix-ide/src/app/plugins/code-format.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { filePathFilter, AnyFilter } from '@jsdevtools/file-path-filter'
99
const profile = {
1010
name: 'codeFormatter',
1111
description: 'prettier plugin for Remix',
12-
methods: ['format'],
12+
methods: ['format', 'preloadPrettier'],
1313
events: [''],
1414
version: '0.0.1'
1515
}
@@ -77,7 +77,7 @@ export class CodeFormat extends Plugin {
7777
* Preload prettier and its plugins to improve first-format performance
7878
* Can be called when the editor finishes loading
7979
*/
80-
async preload() {
80+
async preloadPrettier() {
8181
// Prevent multiple simultaneous preload calls
8282
if (this.preloadPromise) {
8383
return this.preloadPromise

0 commit comments

Comments
 (0)