{"id":34931367,"url":"https://github.com/mistweaverco/snap.nvim","last_synced_at":"2026-01-13T23:36:19.322Z","repository":{"id":329245126,"uuid":"1112658459","full_name":"mistweaverco/snap.nvim","owner":"mistweaverco","description":"Neovim screenshots 📷 that match your color scheme 🎨.","archived":false,"fork":false,"pushed_at":"2026-01-12T16:05:37.000Z","size":1196,"stargazers_count":26,"open_issues_count":6,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T19:44:05.559Z","etag":null,"topics":["neovim","neovim-plugin","playwright","playwright-typescript","screenshot","tree-sitter","tree-sitter-highlight"],"latest_commit_sha":null,"homepage":"https://snap.nvim.forthelazy.dev","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mistweaverco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-08T23:38:20.000Z","updated_at":"2026-01-12T16:05:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mistweaverco/snap.nvim","commit_stats":null,"previous_names":["mistweaverco/snap.nvim"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/mistweaverco/snap.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistweaverco%2Fsnap.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistweaverco%2Fsnap.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistweaverco%2Fsnap.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistweaverco%2Fsnap.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mistweaverco","download_url":"https://codeload.github.com/mistweaverco/snap.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistweaverco%2Fsnap.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","neovim-plugin","playwright","playwright-typescript","screenshot","tree-sitter","tree-sitter-highlight"],"created_at":"2025-12-26T16:21:41.335Z","updated_at":"2026-01-13T23:36:19.316Z","avatar_url":"https://github.com/mistweaverco.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n![Snap.nvim Logo][logo]\n\n# Snap.nvim\n\n[![Made with love][badge-made-with-love]][contributors]\n[![Development status][badge-development-status]][development-status]\n[![Our manifesto][badge-our-manifesto]][our-manifesto]\n![Made with lua][badge-made-with-lua]\n[![Latest release][badge-latest-release]][latest-release]\n\n[What](#what) •\n[Requirements](#requirements) •\n[Install](#install) •\n[Configuration](#configuration)\n\n\u003cp\u003e\u003c/p\u003e\n\nA minimal screenshot plugin for Neovim.\n\nIt respects your current color scheme to ensure that the screenshots\nblend seamlessly with your Neovim setup.\n\n\u003c/div\u003e\n\n## What\n\nSnap.nvim is a minimal screenshot plugin for Neovim that\nallows users to capture screenshots directly from the editor.\n\nIt provides a uncomplicated and efficient way to take screenshots without\nleaving the Neovim environment.\n\nJust select the area you want to capture in visual mode and\nrun the command to take a screenshot.\n\nOr you can run the command without selecting anything to\ncapture the entire Neovim window.\n\n## Requirements\n\n- Neovim 0.11.5+\n- cURL installed on your system\n  (for downloading pre-built binaries)\n- Extraction tools for archive extraction:\n  - **Windows**: `unzip` (usually available via Git Bash, WSL, or MSYS2)\n  - **Linux/macOS**: `tar` (typically pre-installed)\n- linux-amd64, macos-amd64, macos-arm64 or windows-amd64 system\n  (you need to build from source for other systems)\n\n### Linux dependencies\n\nOn Linux systems, the following packages are required for the bundled Chromium browser:\n\n```bash\n# Debian/Ubuntu\nsudo apt install libnss3 libatk-bridge2.0-0 libx11-xcb1\n\n# Fedora/RHEL\nsudo dnf install nss atk at-spi2-atk libxkbcommon\n\n# Arch Linux\nsudo pacman -S nss atk at-spi2-atk libxkbcommon\n```\n\n## Install\n\nPlease use release tags when installing the plugin to ensure\ncompatibility and stability.\n\nThe `main` branch may contain breaking changes\nand isn't guaranteed to be stable.\n\n### lazy.nvim\n\nSee: [lazy.nvim](https://github.com/folke/lazy.nvim)\n\n```lua\n{\n  'mistweaverco/snap.nvim',\n  version = 'v1.5.0',\n  cmd = \"Snap\",\n  ---@type SnapUserConfig\n  opts = {},\n  event = \"VeryLazy\"\n}\n```\n\n\u003e [!IMPORTANT]\n\u003e `opts` needs to be at least an empty table `{}` and can't be completely omitted.\n\n### packer.nvim\n\nSee: [packer.nvim](https://github.com/wbthomason/packer.nvim)\n\n```lua\nuse {\n  'mistweaverco/snap.nvim',\n  tag = 'v1.5.0',\n  config = function()\n\n    ---@type SnapUserConfig\n    local cfg = {}\n    require('snap').setup(cfg)\n  end\n})\n```\n\n\u003e [!IMPORTANT]\n\u003e `setup` call needs to have at least an empty table `{}` and\n\u003e can't be completely omitted.\n\n### Neovim built-in package manager\n\n```lua\nvim.pack.add({\n  src = 'https://github.com/mistweaverco/snap.nvim.git',\n  version = 'v1.5.0',\n})\n---@type SnapUserConfig\nlocal cfg = {}\nrequire('snap').setup(cfg)\n```\n\n\u003e [!IMPORTANT]\n\u003e `setup` call needs to have at least an empty table `{}` and\n\u003e can't be completely omitted.\n\n## Configuration\n\n### Configure `templateFilepath`\n\nOptional. Defaults to `nil`.\n\nAbsolute path to a custom handlebars template file.\n\nSee the [builtin templates](./templates/) for reference.\n\n### Configure `additional_template_data`\n\nOptional. Defaults to `{}`.\n\nA table of additional data to pass to your custom the handlebars template.\n\nAvailable as `data.YOURKEY` variables in the template.\n\n### Configure `font_settings`\n\nOptional. Defaults to:\n\n```lua\n{\n  size = 14, -- Default font size for the screenshot in pt\n  line_height = 1.0, -- Default line height for the screenshot in pt\n  default = {\n    name = \"FiraCode Nerd Font\",\n    file = nil,\n  },\n  bold = {\n    name = \"FiraCode Nerd Font\",\n    file = nil,\n  },\n  italic = {\n    name = \"FiraCode Nerd Font\",\n    file = nil,\n  },\n  bold_italic = {\n    name = \"FiraCode Nerd Font\",\n    file = nil,\n  },\n}\n```\n\nConfigure font settings for the screenshot.\n\nFont settings are optional,\nbut recommended to ensure that the screenshot\nmatches your Neovim setup.\n\nWe can't detect your font settings (of your terminal) automatically,\nso you need to specify them manually.\n\nFor wezterm, this is what it could look like in your wezterm config:\n\n```lua\nlocal wezterm = require(\"wezterm\")\n\nlocal config = wezterm.config_builder()\n\nconfig.font = wezterm.font_with_fallback({\n  \"FiraCode Nerd Font\",\n  \"VictorMono Nerd Font\",\n  \"Noto Color Emoji\",\n})\n\nconfig.font_rules = {\n  {\n    italic = true,\n    intensity = \"Normal\",\n    font = wezterm.font({\n      family = \"VictorMono Nerd Font\",\n      stretch = \"Normal\",\n      weight = \"Regular\",\n      style = \"Italic\",\n    }),\n  },\n  {\n    italic = true,\n    intensity = \"Bold\",\n    font = wezterm.font({\n      family = \"VictorMono Nerd Font\",\n      stretch = \"Normal\",\n      weight = \"Bold\",\n      style = \"Italic\",\n    }),\n  },\n  {\n    italic = false,\n    intensity = \"Normal\",\n    font = wezterm.font({\n      family = \"FiraCode Nerd Font\",\n      stretch = \"Normal\",\n      weight = \"Regular\",\n      style = \"Normal\",\n    }),\n  },\n  {\n    italic = false,\n    intensity = \"Bold\",\n    font = wezterm.font({\n      family = \"FiraCode Nerd Font\",\n      stretch = \"Normal\",\n      weight = \"Bold\",\n      style = \"Normal\",\n    }),\n  },\n}\n\nconfig.font_size = 14.0\nconfig.line_height = 1.0\n\nreturn config\n```\n\nThis would then translate to the following `font_settings`:\n\n```lua\nreturn {\n  \"mistweaverco/snap.nvim\",\n  version = 'v1.5.0',\n  ---@type SnapUserConfig\n  opts = {\n    template = \"linux\",\n    font_settings = {\n      size = 14,\n      line_height = 1.0,\n      fonts = {\n        default = {\n          name = \"FiraCode Nerd Font\",\n          file = nil,\n        },\n        bold = {\n          name = \"VictorMono Nerd Font\",\n          file = nil,\n        },\n        italic = {\n          name = \"VictorMono Nerd Font\",\n          file = nil,\n        },\n        bold_italic = {\n          name = \"VictorMono Nerd Font\",\n          file = nil,\n        },\n      },\n    },\n  },\n}\n```\n\n### Configure `timeout`\n\nOptional. Defaults to `5000`.\n\nTimeout for the screenshot command in milliseconds.\n\n### Configure `output_dir`\n\nOptional. Defaults to `$HOME/Pictures/Screenshots`.\n\nDirectory to save screenshots.\n\n### Configure `filename_pattern`\n\nOptional. Defaults to `snap.nvim_%t`.\n\nFilename pattern for the generated files.\nFile extension will be added automatically based on the output format.\n\nSupports the following placeholders:\n\n- `%t` - Timestamp in `YYYYMMDD_HHMMSS` format\n- `%time` - Time in `HHMMSS` format, e.g., `153045`\n- `%date` - Date in `YYYYMMDD` format, e.g., `20210702`\n- `%file_name` - Original filename, e.g., `my_script`\n- `%file_extension` - Original file extension, e.g., `lua`, `py`, `js`\n- `%unixtime` - Unix timestamp, e.g., `1625247600`\n\n### Configure `template`\n\nOptional. Defaults to `default`.\n\nTemplate to use for rendering screenshots.\n\nValid options are:\n\n- `default` - The default template provided by the plugin\n- `macos` - A macOS-style template\n- `linux` - A Linux-style template\n\n### Configure `template_filepath`\n\nOptional. Defaults to `nil`.\n\nAbsolute path to a custom handlebars template file.\nIf set, this option overrides the `template` option.\n\n### Configure `save_to_disk`\n\nOptional. Defaults to:\n\n```lua\n{\n  image = true,\n  html = true,\n}\n```\n\n### Configure `copy_to_clipboard`\n\nOptional. Defaults to:\n\n```lua\n{\n  image = true,\n  html = true,\n}\n```\n\n### Configure `log_level`\n\nOptional. Defaults to `\"error\"`.\n\nLog level for debugging. Controls which log messages are displayed.\n\nValid options are:\n\n- `\"trace\"` - Most verbose, shows all log messages\n- `\"debug\"` - Shows debug, info, warn, and error messages\n- `\"info\"` - Shows info, warn, and error messages\n- `\"warn\"` - Shows warn and error messages\n- `\"error\"` - Shows only error messages (default)\n- `\"off\"` - Disables all logging\n\n```lua\nlog_level = \"error\",  -- Log level for debugging\n```\n\n### Configure `development_mode`\n\nOptional. Defaults to `nil`.\n\nIf set, no pre-compiled binaries will be downloaded\nand the plugin will attempt to run directly from source.\n\nRequires [Bun](https://bun.sh/) to be installed on your system.\nAdditionally you need to install the dependencies\nby running `bun install` in the plugin directory.\n\n```lua\n{\n  backend = \"bun\",  -- Development mode backend to use (currently only \"bun\" is supported)\n}\n```\n\n### Full example configuration\n\n```lua\n{\n  'mistweaverco/snap.nvim',\n  version = 'v1.5.0',\n  opts = {\n    timeout = 5000, -- Timeout for screenshot command in milliseconds\n    log_level = \"error\", -- Log level for debugging (e.g., \"trace\", \"debug\", \"info\", \"warn\", \"error\", \"off\")\n    template = \"default\", -- Template to use for rendering screenshots (\"default\", \"macos\", \"linux\")\n    template_filepath = nil, -- Absolute path to a custom handlebars template file (optional), overrides 'template' option\n    -- Additional data to pass to the your custom handlebars template (optional)\n    additional_template_data = {\n      author = \"Your Name\",\n      website = \"https://yourwebsite.com\",\n    },\n    output_dir = \"$HOME/Pictures/Screenshots\", -- Directory to save screenshots\n    filename_pattern = \"snap.nvim_%t\", -- e.g., \"snap.nvim_%t\" (supports %t for timestamp)\n    save_to_disk = {\n        image = true, -- Whether to save the image to disk\n        html = true, -- Whether to save the HTML to disk\n    },\n    copy_to_clipboard = {\n        image = true, -- Whether to copy the image to clipboard\n        html = true, -- Whether to copy the HTML to clipboard\n    },\n    font_settings = {\n      size = 14,         -- Default font size for the screenshot in pt\n      line_height = 1.0, -- Default line height for the screenshot in pt\n      default = {\n        name = \"FiraCode Nerd Font\", -- Default font name for the screenshot\n        file = nil,         -- Absolute path to a custom font file (.ttf) (optional)\n        -- Only needed if the font is not installed system-wide\n        -- or if you want to export as HTML with the font embedded\n        -- so you can view it correctly in E-mails or browsers\n      },\n      -- Optional font settings for different text styles (bold, italic, bold_italic)\n      bold = {\n        name = \"FiraCode Nerd Font\", -- Font name for bold text\n        file = nil,         -- Absolute path to a custom font file (.ttf) (optional)\n        -- Only needed if the font is not installed system-wide\n        -- or if you want to export as HTML with the font embedded\n        -- so you can view it correctly in E-mails or browsers\n      },\n      italic = {\n        name = \"FiraCode Nerd Font\", -- Font name for italic text\n        file = nil,         -- Absolute path to a custom font file (.ttf) (optional)\n        -- Only needed if the font is not installed system-wide\n        -- or if you want to export as HTML with the font embedded\n        -- so you can view it correctly in E-mails or browsers\n      },\n      bold_italic = {\n        name = \"FiraCode Nerd Font\", -- Font name for bold and italic text\n        file = nil,         -- Absolute path to a custom font file (.ttf) (optional)\n        -- Only needed if the font is not installed system-wide\n        -- or if you want to export as HTML with the font embedded\n        -- so you can view it correctly in E-mails or browsers\n      },\n    },\n    -- defaults to nil\n    -- if set, no pre-compiled binaries will be downloaded\n    -- and the plugin will attempt to run directly from source\n    development_mode = {\n      backend = \"bun\",  -- Development mode backend to use (currently only \"bun\" is supported)\n    },\n  },\n},\n```\n\n## Commands\n\nAll commands can be run in normal or visual mode.\n\n\u003e [!IMPORTANT]\n\u003e Clipboard functionality depends on your system's clipboard\n\u003e and Neovim's clipboard support being properly configured.\n\u003e\n\u003e For Linux systems, ensure that you have\n\u003e `wl-clip` or `xclip` installed for clipboard operations to work.\n\u003e\n\u003e On macOS, clipboard support is typically available by default.\n\u003e\n\u003e On Windows, clipboard support is also generally available by default.\n\n### Snap command\n\nUsage: `:Snap`\n\nSave a screenshot of the current file or\nvisual selection and copy it to the clipboard as an image.\n\n## Snap arguments\n\nUsage: `:Snap args`\n\nSnap allows different arguments to control its behavior.\n\n### Snap html argument\n\nUsage: `:Snap html`\n\nSave a screenshot of the current file or visual selection as an HTML file and\ncopy the HTML representation to the clipboard.\n\n[badge-made-with-lua]: assets/badge-made-with-lua.svg\n[badge-development-status]: assets/badge-development-status.svg\n[badge-our-manifesto]: assets/badge-our-manifesto.svg\n[badge-made-with-love]: assets/badge-made-with-love.svg\n[our-manifesto]: https://mistweaverco.com/manifesto\n[development-status]: https://github.com/orgs/mistweaverco/projects/5/views/1?filterQuery=repo%3Amistweaverco%2Fsnap.nvim\n[contributors]: https://github.com/mistweaverco/snap.nvim/graphs/contributors\n[logo]: assets/logo.svg\n[badge-latest-release]: https://img.shields.io/github/v/release/mistweaverco/snap.nvim?style=for-the-badge\n[latest-release]: https://github.com/mistweaverco/snap.nvim/releases/latest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistweaverco%2Fsnap.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmistweaverco%2Fsnap.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistweaverco%2Fsnap.nvim/lists"}