Skip to content

acuteenvy/tldr.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tldr.nvim

CI license matrix

Preview tldr pages using a client directly in Neovim.

screenshot

Installation

Note

tldr.nvim requires a tldr client on your $PATH.

{
    "acuteenvy/tldr.nvim",
    cmd = "Tldr",
    config = function()
        require("tldr").setup()
    end
}

Configuration

setup() accepts some options. This is the default configuration:

require("tldr").setup({
    -- Arguments passed to the tldr client to render a page.
    -- tldr.nvim adds the path to the page after these arguments.
    client_args = "--color always --render",
    window = {
        -- Dimensions of the tldr window. Can be either a fixed value (an integer greater than 1)
        -- or a percentage of the screen height/width (a float from 0 to 1).
        height = 0.8,
        width = 0.8,
        -- The border of the tldr window. Accepts the same values as nvim_open_win().
        -- https://neovim.io/doc/user/api.html#nvim_open_win()
        border = "single",
    },
})

Usage

Running :Tldr opens a floating window with the output of tldr <configured_args> <path/to/current/file>. Press q or Esc to close it.

Releases

No releases published

Packages

No packages published

Languages