diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-01-22 10:13:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 10:13:35 +0000 |
commit | 1233ac467de7504b277425988ef9be7f8d3a9626 (patch) | |
tree | 0f90618b9a542e3bc859cf03079d8149d10e77e1 /runtime | |
parent | 21b36c7d7fa351544253316c606651e9ce925b29 (diff) | |
download | rneovim-1233ac467de7504b277425988ef9be7f8d3a9626.tar.gz rneovim-1233ac467de7504b277425988ef9be7f8d3a9626.tar.bz2 rneovim-1233ac467de7504b277425988ef9be7f8d3a9626.zip |
feat(fold): transparent foldtext
'foldtext' can be set to an empty string to disable and render the
line with:
- extmark highlight
- syntax highlighting
- search highlighting
- no line wrapping
- spelling
- conceal
- inline virtual text
- respects `fillchars:fold`
Currently normal virtual text is not displayed
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/news.txt | 3 | ||||
-rw-r--r-- | runtime/doc/options.txt | 3 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/options.lua | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 9ef9132c65..d63d1e6928 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -154,6 +154,9 @@ The following new APIs and features were added. • 'foldtext' now supports virtual text format. |fold-foldtext| +• |'foldtext'| can be set to an empty string to disable and render the line: + as normal with regular highlighting and no line wrapping. + • The terminal buffer now supports reflow (wrapped lines adapt when the buffer is resized horizontally). Note: Lines that are not visible and kept in |'scrollback'| are not reflown. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 59ac3b7f34..ac35ad2592 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -2714,6 +2714,9 @@ A jump table for the options with a short description can be found at |Q_op|. It is not allowed to change text or jump to another window while evaluating 'foldtext' |textlock|. + When set to an empty string, foldtext is disabled, and the line + is displayed normally with highlighting and no line wrapping. + *'formatexpr'* *'fex'* 'formatexpr' 'fex' string (default "") local to buffer diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index c9e2e302dc..60339f57d8 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -2473,6 +2473,9 @@ vim.go.fdo = vim.go.foldopen --- It is not allowed to change text or jump to another window while --- evaluating 'foldtext' `textlock`. --- +--- When set to an empty string, foldtext is disabled, and the line +--- is displayed normally with highlighting and no line wrapping. +--- --- @type string vim.o.foldtext = "foldtext()" vim.o.fdt = vim.o.foldtext |