Skip to content

Commit

Permalink
docs(previewer): term_preview env option (#3226)
Browse files Browse the repository at this point in the history
* docs(previewer): term_preview `env` option

* [docgen] Update doc/telescope.txt
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
  • Loading branch information
jamestrew and Github Actions authored Jul 26, 2024
1 parent 3264f0a commit 10b8a82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions doc/telescope.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3855,13 +3855,16 @@ previewers.new_termopen_previewer() *telescope.previewers.new_termopen_previewer
- `title` a static title for example "File Preview"
- `dyn_title(self, entry)` a dynamic title function which gets called when
config value `dynamic_preview_title = true`
- `env` table: define environment variables to forward to the terminal
process. Example:
- `{ ['PAGER'] = '', ['MANWIDTH'] = 50 }`

It's an easy way to get your first previewer going and it integrates well
with `bat` and `less`. Providing out of the box scrolling if the command
uses less.

Furthermore, it will forward all `config.set_env` environment variables to
that terminal process.
Furthermore, if `env` is not set, it will forward all `config.set_env`
environment variables to that terminal process.



Expand Down
2 changes: 1 addition & 1 deletion lua/telescope/previewers/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ end
--- Additionally you can define:
--- - `title` a static title for example "File Preview"
--- - `dyn_title(self, entry)` a dynamic title function which gets called
--- when config value `dynamic_preview_title = true`
--- - `env` table: define environment variables to forward to the terminal
--- process. Example:
--- - `{ ['PAGER'] = '', ['MANWIDTH'] = 50 }`
--- when config value `dynamic_preview_title = true`
---
--- It's an easy way to get your first previewer going and it integrates well
--- with `bat` and `less`. Providing out of the box scrolling if the command
Expand Down

0 comments on commit 10b8a82

Please sign in to comment.