Skip to content

Commit

Permalink
impr(codesnap-nvim): version picking
Browse files Browse the repository at this point in the history
This commit also adds extra information about windows support and
versioning
  • Loading branch information
Std-Enigma committed Jul 25, 2024
1 parent ddce497 commit 9100cce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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] **Windows Support:**
>
> 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**.
>
> _Note_: If you already have a version of 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

0 comments on commit 9100cce

Please sign in to comment.