Using your plugin manager at your disposal, in the example lazy is going to be used.
Note
If you don't have freeze installed,
and you are have golang installed, it will
go install github.com/charmbracelet/freeze@latest
for you 🫡.
In the case that you don't have neither of those, don't you worry 😉, we got you
cover. It will install freeze
using cURL
to the
freeze's releases page.
- Default installation:
return {
"AlejandroSuero/freeze-code.nvim",
config = function()
require("freeze-code").setup()
end,
}
Note
You can also install it using Rocks.nvim
:Rocks install freeze-code.nvim
Also as luarocks install freeze-code.nvim
- Customizable installation:
return {
"AlejandroSuero/freeze-code.nvim",
config = function()
require("freeze-code.nvim").setup({
-- your configuration goes here
})
end,
}
Note
See default configuration below.
local opts = {
freeze_path = vim.fn.exepath("freeze"), -- where is freeze installed
copy_cmd = "pngcopy", -- the default copy commands are in the bin directory
copy = false, -- copy after screenshot option
open = false, -- open after screenshot option
dir = vim.env.PWD, -- where is the image going to be saved "." as default
freeze_config = { -- configuration options for `freeze` command
output = "freeze.png",
config = "base",
theme = "default",
},
}
Note
The commands to copy, as defaults per OS will be in the bin-directory
Once you have it installed, you can use :checkhealt freeze-code
to see if there
are any problems with the installation or you need to install aditional tools.
Thank you to everyone that is contributing and to those who want to contribute. Any contribution is welcomed!
Quick guide:
- Fork this project.
- Clone your fork (
git clone <fork-URL>
). - Add main repo as remote (
git remote add upstream <main-repo-URL>
). - Create a branch for your changes (
git switch -c feature/your-feature
orgit switch -c fix/your-fix
). - Commit your changes (
git commit -m "feat(...): ..."
). - Push to your fork (
git push origin <branch-name>
). - Open a PR.
For more information, check CONTRIBUTING.md.