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

feat(codesnap-nvim): support for windows users #1123

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lua/astrocommunity/media/codesnap-nvim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
📸 Snapshot plugin with rich features that can make pretty code snapshots for Neovim

**Repository:** <https://github.com/mistricky/codesnap.nvim>

> [!NOTE]
>
> The latest version of CodeSnap does not support Windows. If you are a Windows user, this plugin will pin the latest compatible version, which is **0.0.11**.
>
> If you already have this plugin installed on your computer, make sure to delete the current version by running the following command: `:Lazy clean codesnap.nvim`
6 changes: 5 additions & 1 deletion lua/astrocommunity/media/codesnap-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
-- TODO: Remove extra version checking when CodeSnap adds Windows compatibility.
local prefix = "<Leader>c"
local is_windows = vim.fn.has "win32" ~= 0
return {
"mistricky/codesnap.nvim",
version = is_windows and "0.0.11" or nil, -- use the most suitable version for windows users otherwise the latest commit
build = "make",
cmd = { "CodeSnap", "CodeSnapSave", "CodeSnapHighlight", "CodeSnapSaveHighlight" },
cmd = is_windows and "CodeSnapPreviewOn"
or { "CodeSnap", "CodeSnapSave", "CodeSnapHighlight", "CodeSnapSaveHighlight" },
dependencies = {
{
"AstroNvim/astrocore",
Expand Down
Loading