obsidian.nvim
obsidian.nvim copied to clipboard
a9e7fde breaks compability with oil.nvim
🐛 Describe the bug
Following commit a9e7fde, creating a new while using oil.nvim
as a directory browser does not work as expected.
Very often I open my note vault in oil.nvim
to choose a note or just as a kind of "start screen" for my vault before creating a new note.
To reproduce, be using oil.nvim
as directory plugin. Open the vault directory in the terminal and run nvim .
to open the vault in oil.nvim
. Then:
Expected behaviour:
ObsidianNew notename
creates ~/home/sam/notes/notename.md
Observed behaviour:
ObsidianNew notename
attempts to create ~/home/sam/notes/oil:/home/sam/notes/notename.md
In the commit where this behaviour started happening, this path is actually created. In more recent commits, we get a FileNotFound error.
This would seem to be something to do with an oil
buffer having the "filename" oil:///<pathtodirectory>
Config
workspaces = {
{
name = "notes",
path = "~/notes/"
}
},
templates = {
subdir = "templates",
date_format = "%Y-%m-%d-%a",
time_format = "%H.%M"
},
disable_frontmatter = true,
note_frontmatter_func = nil,
daily_notes = { folder = "journal", date_format = "%Y-%m-%d-%a" },
completion = {
nvim_cmp = true, -- if using nvim-cmp, otherwise set to false
min_chars = 2,
},
note_id_func = function(title)
title = title or ""
return tostring(os.date("%Y%m%d%H%M")) .. " " .. title
end
}
Environment
NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Run "nvim -V1 -v" for more info
Obsidian.nvim v3.7.10 (ec0f44e1921d2701bd99a542031d280f1e3930b5)
Status:
• buffer directory: nil
• working directory: /home/sam/notes
Workspaces:
✓ active workspace: Workspace(name='notes', path='/home/sam/notes', root='/home/sam/notes')
Dependencies:
✓ plenary.nvim: 8aad4396840be7fc42896e3011751b7609ca4119
✓ nvim-cmp: ce16de5665c766f39c271705b17fff06f7bcb84f
✓ telescope.nvim: 7d1698f3d88b448e0639974248cc17f49b7b8acf
Integrations:
✓ picker: TelescopePicker()
✓ completion: enabled (nvim-cmp) ✗ refs, ✗ tags, ✗ new
all sources:
• nvim_lsp
• luasnip
• buffer
Tools:
✓ rg: ripgrep 13.0.0
Environment:
• operating system: Linux
Config:
• notes_subdir: nil