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

[codesnap-nvim] doesn't save the pictures to the drive #1120

Closed
4 tasks done
Std-Enigma opened this issue Jul 23, 2024 · 0 comments · Fixed by #1121
Closed
4 tasks done

[codesnap-nvim] doesn't save the pictures to the drive #1120

Std-Enigma opened this issue Jul 23, 2024 · 0 comments · Fixed by #1121
Labels
bug Something isn't working

Comments

@Std-Enigma
Copy link
Contributor

Checklist

  • I have searched through the AstroNvim documentation
  • I have searched through the existing issues of this project
  • I have searched the existing issues of plugins related to this issue
  • I can replicate the bug with the minimal repro.lua provided below

Neovim version (nvim -v)

0.10.0 release

Operating system/version

ArchLinux

Terminal/GUI

kitty

Describe the bug

Since the save_path options isn't specified in the plugin the taken pictures don't get saved.

Steps to Reproduce

  1. Select a part of your code
  2. run the CodeSnapSave command

Expected behavior

CodeSnap should the save the picture to your system's hard drive

Screenshots

No response

Additional Context

this is the error you get:
If you want to save snapshot in somewhere, you should config the save_path before, refer: https://github.com/mistricky/codesnap.nvim?tab=readme-ov-file#save-the-snapshot

Minimal configuration

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup {
  { "AstroNvim/AstroNvim", import = "astronvim.plugins" },
  { "AstroNvim/astrocommunity", { import = "astrocommunity.media.codesnap-nvim" } },
}
@Std-Enigma Std-Enigma added the bug Something isn't working label Jul 23, 2024
@Uzaaft Uzaaft reopened this Jul 28, 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

Successfully merging a pull request may close this issue.

2 participants