feat(nvim): improve tree and file switching, and implements links

This commit is contained in:
Pihkaal
2024-05-31 22:56:08 +02:00
parent 0c79ea457c
commit 96207863a9
12 changed files with 361 additions and 309 deletions

29
src/utils/icons.ts Normal file
View File

@@ -0,0 +1,29 @@
import { Icon } from "./types";
export const ICONS: Record<string, Icon> = {
md: {
char: " ",
color: "#89bafa",
},
asc: {
char: "󰷖 ",
color: "#f9e2af",
},
ts: {
char: " ",
color: "#4d86a2",
},
rs: {
char: " ",
color: "#be8f78",
},
instagram: {
char: " ",
color: "#e1306c",
},
github: {
char: "󰊤 ",
color: "#ffffff",
},
UNKNOWN: { char: "󰈚 ", color: "#f599ae" },
};

View File

@@ -9,5 +9,36 @@ export type InnerKittyProps<T extends (...args: any[]) => any> = Prettify<
export type RootManifest = {
files: Array<string>;
projects: Array<string>;
projects: Array<{
name: string;
icon: string;
}>;
links: Array<{
name: string;
url: string;
icon: string;
}>;
};
export type Icon = {
char: string;
color: string;
};
export type File = {
name: string;
} & (
| {
type: "link";
url: string;
icon: string;
}
| { type: "file"; repo: string; fileName: string; icon?: string }
);
export type Directory = {
name: string;
type: "directory";
files: Array<File>;
opened: boolean;
};