新規ノートを作成するとカレントディレクトリ配下にできてしまうが、プロジェクトルートや任意のディレクトリ内に作成したい場合の話。`new_notes_location`の設定を変更する。
```lua
require("obsidian").setup({
-- デフォルトのcurrent_dirではなくnotes_subdirを設定
new_notes_location = "notes_subdir",
})
```
上記の設定ではプロジェクトルート配下に作成される。ディレクトリを指定したい場合は`workspaces.overrides.notes_subdir`で指定する。
```lua
require("obsidian").setup({
workspaces = {
{
name = "work",
path = "~/work/pkm",
---@diagnostic disable-next-line: missing-fields
overrides = {
-- プロジェクトルート配下のnotesディレクトリ内に作成する
notes_subdir = "notes",
},
},
},
-- デフォルトのcurrent_dirではなくnotes_subdirを設定
new_notes_location = "notes_subdir",
})
```