@@ -30,8 +30,10 @@ type Ext = {
3030 column : Record < string , BaseColumn < BaseParams > > ;
3131} ;
3232
33+ const PLUGIN_PREFIX = "@ddu" ;
34+
3335// Pattern for directories where auto-loadable extensions are placed by type
34- const TYPE_DIR_PATTERN = " denops/@ddu -*s" ;
36+ const TYPE_DIR_PATTERN = ` denops/${ PLUGIN_PREFIX } -*s` ;
3537
3638// Structured extension module entry point file.
3739const EXT_ENTRY_POINT_FILE = "main.ts" ;
@@ -73,7 +75,9 @@ export class Loader {
7375 }
7476 }
7577
76- const key = `@ddu-${ type } s/${ this . getAlias ( type , name ) ?? name } ` ;
78+ const key = `${ PLUGIN_PREFIX } -${ type } s/${
79+ this . getAlias ( type , name ) ?? name
80+ } `;
7781 const path = this . #cachedPaths. get ( key ) ;
7882
7983 if ( ! path ) {
@@ -300,14 +304,14 @@ async function createPathCache(
300304 // Create key paths for both single-file and directory entry points.
301305 // Prioritize the first occurrence key in keyPaths.
302306 const keyPaths : Readonly < [ key : string , path : string ] > [ ] = [
303- // 1. `@ddu-{type}s/ {name}.ts`
307+ // 1. `{name}.ts`
304308 ...extFileGlob . map ( ( extFile ) => {
305309 const { name, dir : typeDir } = parse ( extFile ) ;
306310 const typeDirName = basename ( typeDir ) ;
307311 const key = `${ typeDirName } /${ name } ` ;
308312 return [ key , extFile ] as const ;
309313 } ) ,
310- // 2. `@ddu-{type}s/ {name}/main.ts`
314+ // 2. `{name}/main.ts`
311315 ...extDirEntryPointGlob . map ( ( entryPoint ) => {
312316 const extDir = dirname ( entryPoint ) ;
313317 const { base : name , dir : typeDir } = parse ( extDir ) ;
0 commit comments