Various previewer fixes (#260)

- Set env vars for previewer with set_env({ key = value } fix #228)
- Set pager for git previewes (default is GIT_PAGER=less so users can scroll see #253)
- Use less for people who don't have bat but less installed
- Reset less env to only '-RS' because '-X' will break scrolling(fix #253, thanks @eth3lbert)
- Scrolling for buffer previewer(thanks @tami5 for helping)
  - Also new function to create buffer previewers (which has scrolling by default). Used for tags and help_tags previewer.
- Add new setting set_env to readme
This commit is contained in:
Simon Hauser
2020-11-22 10:57:31 +01:00
committed by GitHub
parent 5513f85b59
commit 874139ee0b
3 changed files with 129 additions and 53 deletions

View File

@@ -62,10 +62,12 @@ function config.set_defaults(defaults)
set("use_less", true)
set("color_devicons", true)
set("set_env", {})
-- TODO: Add motions to keybindings
-- To disable a keymap, put [map] = false
-- So, to not map "<C-n>", just put
-- So, to not map "<C-n>", just put
--
-- ...,
-- ["<C-n>"] = false,