epwalsh / epwalsh/obsidian.nvim
ObsidianPasteImg never works.
- Dominant language
- Lua
- Stars
- 6.2k
- Forks
- 250
- PR merge metrics
- No merged PRs in 30d
Description
### 🐛 Describe the bug
Whenever using this command it says no image data in the clipboard.
### Config
```lua
return {
"epwalsh/obsidian.nvim",
version = "*",
lazy = true,
cmd = "ObsidianQuickSwitch",
ft = "markdown",
keys = {
{ "wW", mode = "n", "ObsidianQuickSwitch", desc = "Obsidian Notes" },
},
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
-- event = {
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
-- "BufReadPre path/to/my-vault/**.md",
-- "BufNewFile path/to/my-vault/**.md",
-- },
dependencies = {
-- Required.
"nvim-lua/plenary.nvim",
"hrsh7th/nvim-cmp",
"nvim-treesitter/nvim-treesitter",
"3rd/image.nvim",
-- see below for full list of optional dependencies 👇
},
opts = {
ui = {
enable = false,
},
templates = {
debug = true,
folder = "~/Code/Obsidian/Templates",
},
daily_notes = {
folder = "Daily",
template = "/Daily Notes.md",
},
attachments = {
img_folder = "Images",
},
follow_url_func = function(url)
print("Opening URL: " .. url)
vim.fn.jobstart({ "xdg-open", url }) -- linux
end,
workspaces = {
{
name = "personal",
path = "~/Code/Obsidian/",
},
},
pickers = {
name = "fzf-lua",
},
},
}
```
### Environment
```
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1720049189
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 (ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b)
Status:
• buffer directory: nil
• working directory: /home/redox/Code/React/PrintToPoint
Workspaces:
✓ active workspace: Workspace(name='personal', path='/home/redox/Code/Obsidian', root='/home/redox/Code/Obsidian')
Dependencies:
✓ plenary.nvim: ec289423a1693aeae6cd0d503bac2856af74edaa
✓ nvim-cmp: ae644feb7b67bf1ce4260c231d1d4300b19c6f30
Integrations:
✓ picker: nil
✓ completion: enabled (nvim-cmp) ✗ refs, ✗ tags, ✗ new
all sources:
• nvim_lsp
• path
• buffer
• lazydev
• luasnip
Tools:
✓ rg: ripgrep 14.1.0
Environment:
• operating system: Linux
Config:
• notes_subdir: nil%
```
Contributor guide
Research direction
Start by reproducing the ObsidianPasteImg command on Linux with an image in the clipboard, using the supplied obsidian.nvim configuration and checking the listed image.nvim dependency. Trace the command's clipboard handling and confirm completion by saving the clipboard image under the configured Images attachment folder instead of reporting that no image data exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100