Preview tldr pages using a client directly in Neovim.
Note
tldr.nvim requires a tldr client on your $PATH
.
{
"acuteenvy/tldr.nvim",
cmd = "Tldr",
config = function()
require("tldr").setup()
end
}
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",
},
})
Running :Tldr
opens a floating window with the output of tldr <configured_args> <path/to/current/file>
. Press q
or Esc
to close it.