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

No picker preview for "ObsidianDailies" when using fzf-lua #796

Open
grezzogg opened this issue Dec 21, 2024 · 2 comments
Open

No picker preview for "ObsidianDailies" when using fzf-lua #796

grezzogg opened this issue Dec 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@grezzogg
Copy link

🐛 Describe the bug

When I had Telescope as my picker and used the command ObsidianDailies the picker showed the file previews but since I switched to fzf-lua the picker for just this command stopped showing. Previews for other commands like "ObsidianQuickSwitch" do work for fzf-lua.

Config

workspaces = {
        {
          name = "notes",
          -- path = "~/mega/obsidian/notes",
          -- path = os.getenv("HOME") or os.getenv("USERPROFILE") .. "/mega/obsidian/notes",
          path = "~/mega/obsidian/notes",
        },
      },
      -- completion = {
      --   new_notes_location = "notes_subdir",
      -- },
      new_notes_location = "notes_subdir",
      note_id_func = function(title)
        local suffix = ""
        if title ~= nil then
          -- If title is given, transform it into valid file name.
          suffix = title
        else
          -- If title is nil, just add 4 random uppercase letters to the suffix.
          for _ = 1, 4 do
            suffix = tostring(os.time())
          end
        end
        return suffix
      end,

      -- Optional, customize the default name or prefix when pasting images via `:ObsidianPasteImg`.
      image_name_func = function()
        -- Prefix image names with timestamp.
        return tostring(os.time())
      end,
      mappings = {
        -- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
        -- ["gf"] = {
        --   action = function()
        --     return require("obsidian").util.gf_passthrough()
        --   end,
        --   opts = { noremap = false, expr = true, buffer = true },
        -- },
        -- Toggle check-boxes.
        ["<leader>ol"] = {
          action = function()
            return require("obsidian").util.toggle_checkbox()
          end,
          opts = { buffer = true },
        },
        ["<cr>"] = {
          action = function()
            return require("obsidian").util.smart_action()
          end,
          opts = { buffer = true, expr = true },
        },
      },
      disable_frontmatter = true,

Environment

NVIM v0.10.2
Build type: RelWithDebInfo
LuaJIT 2.1.1731601260
Run "nvim -V1 -v" for more info
fzf-lua fatal: '_G._fzf_lua_server', '_G._devicons_path' both nil
fzf-lua fatal: '_G._fzf_lua_server', '_G._devicons_path' both nil
Obsidian.nvim v3.9.0 (14e0427bef6c55da0d63f9a313fd9941be3a2479)
Status:
  • buffer directory: nil
  • working directory: /home/hector
Workspaces:
  ✓ active workspace: Workspace(name='notes', path='/home/hector/mega/obsidian/notes', root='/home/hector/mega/obsidian/notes')
Dependencies:
  ✓ plenary.nvim: 2d9b06177a975543726ce5c73fca176cedbffe9d
Integrations:
  ✓ picker: nil
  ✗ completion: disabled
Tools:
  ✓ rg: ripgrep 14.1.1
Environment:
  • operating system: Linux
Config:
  • notes_subdir: nil
@grezzogg grezzogg added the bug Something isn't working label Dec 21, 2024
@redoxahmii
Copy link

Not the whole config so can't tell but are you passing :

pickers = {
        name = "fzf-lua",
      }

Cause works fine here.

@grezzogg
Copy link
Author

Ok I'm using lazyvim so I started a clean nvim install without it with NVIM_APPNAME=test
Installed lazy,fzf-lua,tokyonight and obsidian.
Added the pickers option as you suggested

But I still don't get a preview when doing "ObsidianDailies". Other commands like ObsidianQuickSwitch do show a preview

Obsidian.nvim v3.9.0 (14e0427)
Status:
• buffer directory: nil
• working directory: /home/hector
Workspaces:
✓ active workspace: Workspace(name='notes', path='/home/hector/mega/obsidian/notes', root='/home/hector/mega/obsidian/notes')
Dependencies:
✓ plenary.nvim: 2d9b06177a975543726ce5c73fca176cedbffe9d
✓ fzf-lua: c3cfa2b59ad1903f79a5a431ce3133300dd6e072
Integrations:
✓ picker: FzfPicker()
✗ completion: disabled
Tools:
✓ rg: ripgrep 14.1.1
Environment:
• operating system: Linux
Config:
• notes_subdir: nil

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

2 participants