A Telescope previewer for tldr-pages.
The tldr-pages project is a collection of community-maintained help pages for command-line tools, that aims to be a simpler, more approachable complement to traditional man pages.
With packer:
use({ 'mrjones2014/tldr.nvim', requires = { 'nvim-telescope/telescope.nvim' } })
You will also need a tldr
client installed.
- tealdeer - fastest, requires
cargo
(part of the Rust toolchain) to install - tldr Node client - requires Node and
npm
to install - tldr Python client - requires Python and
pip
to install
Additionally, for preview scrolling to work, you will need to have Less installed -- chances are it's already installed on your system.
To configure:
require('tldr').setup({
-- your config here, see below for options
})
-- or
require('telescope').setup({
extensions = {
tldr = {
-- your config here, see below for options
}
}
})
Default config is shown below:
{
-- the shell command to use
tldr_command = 'tldr',
-- a string of extra arguments to pass to `tldr`, e.g. tldr_args = '--color always'
tldr_args = ''
}
:Telescope tldr
or :Tldr
or :lua require('tldr').pick()