Skip to content

Commit 7f2f444

Browse files
committed
Better path joining
1 parent 3255bb0 commit 7f2f444

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/obsidian/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ obsidian.setup = function(opts)
8787
-- Complete lazy setup on BufEnter
8888
vim.api.nvim_create_autocmd({ "BufEnter" }, {
8989
group = group,
90-
pattern = tostring(self.dir) .. "/**.md",
90+
pattern = tostring(self.dir / "**.md"),
9191
callback = lazy_setup,
9292
})
9393

9494
-- Add missing frontmatter on BufWritePre
9595
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
9696
group = group,
97-
pattern = tostring(self.dir) .. "/**.md",
97+
pattern = tostring(self.dir / "**.md"),
9898
callback = function()
9999
local bufnr = vim.api.nvim_get_current_buf()
100100
local note = obsidian.note.from_buffer(bufnr, self.dir)

0 commit comments

Comments
 (0)