Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a9e7fde breaks compability with oil.nvim #546

Open
s-cassidy opened this issue Apr 21, 2024 · 0 comments
Open

a9e7fde breaks compability with oil.nvim #546

s-cassidy opened this issue Apr 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@s-cassidy
Copy link
Contributor

🐛 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
@s-cassidy s-cassidy added the bug Something isn't working label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant