Skip to content

Latest commit

 

History

History
113 lines (89 loc) · 3.42 KB

README.md

File metadata and controls

113 lines (89 loc) · 3.42 KB

Freeze NeoVim Plugin

Take a "screenshot" of your code by turning it into an image, thanks to freeze by charm.

Report an issue · Suggest a feature

Installation

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.

Contributing

Thank you to everyone that is contributing and to those who want to contribute. Any contribution is welcomed!

Quick guide:

  1. Fork this project.
  2. Clone your fork (git clone <fork-URL>).
  3. Add main repo as remote (git remote add upstream <main-repo-URL>).
  4. Create a branch for your changes (git switch -c feature/your-feature or git switch -c fix/your-fix).
  5. Commit your changes (git commit -m "feat(...): ...").
  6. Push to your fork (git push origin <branch-name>).
  7. Open a PR.

For more information, check CONTRIBUTING.md.