diff --git a/.config/config.ron b/.config/config.ron index 8e0ee61..b7545e3 100644 --- a/.config/config.ron +++ b/.config/config.ron @@ -1,27 +1,27 @@ ( directory: "/Users/suri/dev/projects/filaments/ZettelKasten", global_key_binds: { - "ctrl-c": Quit, - "ctrl-z": Suspend, "up": MoveUp, + "ctrl-c": Quit, "down": MoveDown, + "ctrl-z": Suspend, }, zk: ( keybinds: { + "": NewZettel, + "enter": OpenZettel, "tab": SwitchTo( region: Todo, ), - "enter": OpenZettel, - "": NewZettel, }, ), todo: ( keybinds: { - "k": MoveUp, - "j": MoveDown, "tab": SwitchTo( region: Zk, ), + "k": MoveUp, + "j": MoveDown, }, ), ) \ No newline at end of file diff --git a/.helix/languages.toml b/.helix/languages.toml new file mode 100644 index 0000000..9143ae0 --- /dev/null +++ b/.helix/languages.toml @@ -0,0 +1,9 @@ +[language-server.filaments] +command = "/Users/suri/dev/projects/filaments/target/debug/fil" +args = ["lsp"] + + +[[language]] +name = "markdown" +roots = [".filaments"] +language-servers = ["filaments", "harper-ls"] diff --git a/crates/dto/migration/src/types/nano_id.rs b/crates/dto/migration/src/types/nano_id.rs index 3f671af..9be8141 100644 --- a/crates/dto/migration/src/types/nano_id.rs +++ b/crates/dto/migration/src/types/nano_id.rs @@ -10,12 +10,13 @@ use serde::{Deserialize, Serialize}; #[sea_orm(value_type = "String")] pub struct NanoId(pub(crate) String); -const ALPHABET: [char; 26] = [ +const ALPHABET: [char; 62] = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', 'x', 'y', 'z', + 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', + 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', + '6', '7', '8', '9', '0', ]; - -pub const NANO_ID_LEN: usize = 6; +pub const NANO_ID_LEN: usize = 8; impl Default for NanoId { fn default() -> Self { diff --git a/src/tui/components/zk/zettel_view.rs b/src/tui/components/zk/zettel_view.rs index 01efce2..baf98ed 100644 --- a/src/tui/components/zk/zettel_view.rs +++ b/src/tui/components/zk/zettel_view.rs @@ -78,7 +78,7 @@ impl Default for Layouts { title_created: Layout::horizontal(vec![Constraint::Fill(80), Constraint::Min(24)]), - tags_id: Layout::horizontal(vec![Constraint::Fill(95), Constraint::Min(8)]), + tags_id: Layout::horizontal(vec![Constraint::Fill(95), Constraint::Min(10)]), } } }