Skip to content

Commit

Permalink
Update: 動的にinlineVimrcsに設定ファイルを追加するやつ
Browse files Browse the repository at this point in the history
  • Loading branch information
yasunori0418 committed Dec 19, 2023
1 parent dab02a9 commit 95a6efa
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion config/dpp/dpp/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Dpp,
Plugin,
} from "https://deno.land/x/dpp_vim@v0.0.8/types.ts";
import { Denops, fn } from "https://deno.land/x/dpp_vim@v0.0.8/deps.ts";
import { Denops, vars } from "https://deno.land/x/dpp_vim@v0.0.8/deps.ts";

type Toml = {
hooks_file?: string;
Expand All @@ -25,6 +25,23 @@ export class Config extends BaseConfig {
basePath: string;
dpp: Dpp;
}): Promise<ConfigReturn> {
const inlineVimrcs: string[] = [];
try {
const RC_DIR = Deno.env.get("RC_DIR");
if (typeof RC_DIR == "undefined") {
throw "failure read directory in $RC_DIR";
}
for (const dirEntry of Deno.readDirSync(RC_DIR)) {
if (typeof dirEntry == "undefined") {
continue;
}
inlineVimrcs.push(dirEntry.name);
}
} catch (e) {
console.error(e);
throw e;
}

args.contextBuilder.setGlobal({
protocols: ["git"],
});
Expand Down

0 comments on commit 95a6efa

Please sign in to comment.