Skip to content

Commit c22da00

Browse files
fix(obsidian): added dynamic workspaces
should figure out what to do with the templates, but meh i have a good idea what i want in my head already
1 parent 20f8df4 commit c22da00

File tree

2 files changed

+40
-13
lines changed
  • configurations/nixos/penguin
  • modules/home/development/neovim/plugins/custom/extras

2 files changed

+40
-13
lines changed

configurations/nixos/penguin/home.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ inputs, pkgs, ... }:
1+
{ pkgs, inputs, ... }:
22
{
33
home-manager.users = {
44
"justinhoang" = {
@@ -27,6 +27,15 @@
2727
lsp = { };
2828
plugins = {
2929
leetcode.enable = true;
30+
obsidian = {
31+
enable = true;
32+
workspaces = [
33+
{
34+
name = "personal";
35+
path = "/home/justinhoang/Documents/vaults/personal";
36+
}
37+
];
38+
};
3039
};
3140
};
3241
zsh.enable = true;

modules/home/development/neovim/plugins/custom/extras/obsidian.nix

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,23 @@ in
1111
options.home.development.neovim.plugins.${name} = {
1212
enable = lib.mkEnableOption "Enable ${name} plugin for neovim";
1313
workspaces = lib.mkOption {
14-
type = with lib.types; nullOr (listOf submodule);
14+
type =
15+
with lib.types;
16+
listOf (
17+
types.submodule {
18+
options = {
19+
name = lib.mkOption {
20+
type = lib.types.str;
21+
description = "The name for this workspace";
22+
};
23+
24+
path = lib.mkOption {
25+
type = lib.types.path;
26+
description = "The path of the workspace.";
27+
};
28+
};
29+
}
30+
);
1531
default = [ ];
1632
};
1733
};
@@ -41,11 +57,11 @@ in
4157
template = null;
4258
};
4359

44-
templates = {
45-
folder = "templates";
46-
date_format = "%Y-%m-%d-%a";
47-
time_format = "%H:%M";
48-
};
60+
# templates = {
61+
# folder = "templates";
62+
# date_format = "%Y-%m-%d-%a";
63+
# time_format = "%H:%M";
64+
# };
4965

5066
# Disable all the mappings
5167
mappings = { };
@@ -78,13 +94,15 @@ in
7894
# Disable the UI rendering for obsidian
7995
ui.enable = false;
8096
};
81-
};
8297

83-
lazyLoad = {
84-
enable = true;
85-
settings = {
86-
ft = "markdown";
87-
};
98+
# NOTE: lazy loading a little bit annoying especially if i want to reach
99+
# the daily notes from anywhere in nvim
100+
# lazyLoad = {
101+
# enable = true;
102+
# settings = {
103+
# ft = "markdown";
104+
# };
105+
# };
88106
};
89107
};
90108
};

0 commit comments

Comments
 (0)