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

Paste image from clipboard #577

Open
1 task done
IldenH opened this issue Jan 22, 2025 · 4 comments
Open
1 task done

Paste image from clipboard #577

IldenH opened this issue Jan 22, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@IldenH
Copy link

IldenH commented Jan 22, 2025

⚠️ Please verify that this bug has NOT been reported before.

  • I checked all existing issues and didn't find a similar issue

Description

When using obsidian.nvim's :ObsidianPasteImage command it says "No image data in clipboard". It works with the same clipboard with nixvim config.

👟 Reproduction steps

  1. Take a screenshot on wayland
  2. :ObsidianPasteImage with vim.useSystemClipboard = true;

👀 Expected behavior

The image gets pasted with obsidan.nvim.

😓 Actual Behavior

Error message: "No image data in clipboard"

💻 Metadata

  • system: "x86_64-linux"
  • host os: Linux 6.6.63, NixOS, 25.05 (Warbler), 25.05.20241205.d0797a0
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.10
  • nixpkgs: /etc/nixpkgs/channels/nixpkgs

📝 Relevant log output

No image data in clipboard
@IldenH IldenH added the bug Something isn't working label Jan 22, 2025
@NotAShelf
Copy link
Owner

Have you enabled the usage of system clipboard? To my knowledge obsidian.nvim is not able to access your system clipboard unless you specifically tell Neovim to use it.

@IldenH
Copy link
Author

IldenH commented Jan 23, 2025

vim.useSystemClipboard is set to true. Is there something else I also need? wl-clipboard is installed and works for plain text, I can copy plain text outside of neovim and paste it in neovim, but not with images.

@NotAShelf
Copy link
Owner

I'm going to have to test this later. Haven't used obsidian.nvim in a while, but can't update my system for now. Please remind me after friday if I do end up forgetting.

Until I check, I'd suggest verifying if wl-clipboard properly handles images in other apps.

@IldenH
Copy link
Author

IldenH commented Jan 24, 2025

Other apps work fine. I tried flake updating to see if that would do something, sadly to no avail.

My config is a fork of https://github.com/LilleAila/nvf-config with some minor irrelevant modifications. LilleAila has had the same problem: LilleAila/nvf-config#2, but fixed itself for him randomly. For me however, the error persists when doing nix run github:LilleAila/nvf-confg.

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