Skip to content

Neovim plugin: read PDF files inside Neovim with dark/text modes, autosave, and bookmarks.

License

Notifications You must be signed in to change notification settings

r-pletnev/pdfreader.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pdfreader.nvim

Read and navigate PDF documents without leaving Neovim.
pdfreader.nvim renders PDF pages directly in the terminal (via Kitty’s graphics protocol). demo


✨ Features

  • Render PDF pages in standard, dark, or text-only mode.
  • Bookmarks
  • Telescope.nvim integration.
  • Works on Mac and Linux.

📋 Requirements

If supported terminal is unavailable, the plugin will automatically work in text mode only.

📦 Installation

lazy.nvim

{
  "r-pletnev/pdfreader.nvim",
  lazy   = false,
  dependencies = {
    "folke/snacks.nvim", -- image rendering
    "nvim-telescope/telescope.nvim", -- pickers

  },
  config = function()
    require("pdfreader").setup()
  end,
}

🚀 Usage

Open a PDF as you would any file:

:e ~/docs/paper.pdf

Key mappings

Key Action
n Next page
p Previous page
z Zoom in
q Zoom out
e Reset zoom

:PDFReader sub-commands

Command Description
:PDFReader setViewMode {standard, dark, text} Change view mode
:PDFReader setAutosave {on, off} Toggle autosave
:PDFReader setPage {num} Jump to page
:PDFReader addBookmark [{num}][,comment] Add bookmark
:PDFReader showBookmarks Telescope bookmarks picker
:PDFReader showRecentBooks Telescope recent books picker
:PDFReader saveState Force save state
:PDFReader clearState Delete state & covers
:PDFReader redrawPage Re-render current page
:PDFReader showToc Show current book table of contents

Command arguments are fully tab-completable.

🛠 Troubleshooting

  • Blank buffer / no images → ensure you are using supported terminal and have installed ImageMagick and poppler-utils.
  • Consult :messages for detailed logs emitted by pdfreader.nvim.

🤝 Contributing

Pull requests and issues are welcome!

About

Neovim plugin: read PDF files inside Neovim with dark/text modes, autosave, and bookmarks.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages