Skip to content

Commit

Permalink
Started updating the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed May 31, 2023
1 parent c595cad commit 3b76cd7
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 11 deletions.
52 changes: 42 additions & 10 deletions doc/scrollview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Web: https://github.com/dstein64/nvim-scrollview
4. Configuration |scrollview-configuration|
5. Issues |scrollview-issues|

|nvim-scrollview| is a plugin that displays interactive vertical scrollbars.
The plugin is customizable (see |scrollview-configuration|).
|nvim-scrollview| is a plugin that displays interactive vertical scrollbars and
signs. The plugin is customizable (see |scrollview-configuration|).

============================================================================
1. Requirements *scrollview-requirements*
Expand All @@ -28,22 +28,35 @@ Use |packages| or one of the various package managers.
============================================================================
3. Usage *scrollview-usage*

* |nvim-scrollview| works automatically, displaying interactive scrollbars.
* |nvim-scrollview| works automatically, displaying interactive scrollbars and
signs.

*scrollview-commands*
* The *:ScrollViewDisable* command disables scrollbars.
* The *:ScrollViewEnable* command enables scrollbars. This is only necessary
if scrollbars have previously been disabled.
* The *:ScrollViewRefresh* command refreshes the scrollbars. This is relevant
when the scrollbars are out-of-sync, which can occur e.g., as a result of
some window arrangement actions (see |scrollview-issues|).
* *:ScrollViewDisable* disables the plugin. When arguments are given, the
specified sign groups are disabled.
* *:ScrollViewEnable* enables the plugin. This is only necessary if
nvim-scrollview has previously been disabled. When arguments are given, the
specified sign groups are enabled.
* *:ScrollViewToggle* toggles the plugin. When arguments are given, the
specified sign groups are toggled.
* *:ScrollViewRefresh* refreshes the scrollbars. This is relevant when the
scrollbars are out-of-sync, which can occur e.g., as a result of some
window arrangement actions (see |scrollview-issues|).
* *:ScrollViewNext* *:ScrollViewPrev* *:ScrollViewFirst* and *:ScrollViewLast*
move the cursor to lines with signs. Arguments can specify which lines are
considered.

*scrollview-mappings*
The following |<Plug>| mappings are defined for convenience.

* `<Plug>(ScrollViewDisable)`
* `<Plug>(ScrollViewEnable)`
* `<Plug>(ScrollViewFirst)`
* `<Plug>(ScrollViewLast)`
* `<Plug>(ScrollViewNext)`
* `<Plug>(ScrollViewPrev)`
* `<Plug>(ScrollViewRefresh)`
* `<Plug>(ScrollViewToggle)`

The following (experimental) |<Plug>| mappings are defined for customizing
mouse functionality (see |scrollview-mouse-customization|).
Expand Down Expand Up @@ -81,6 +94,11 @@ scrollview_base |String| specifying where the scrollbar is anchored.
Possible values are `'left'` or `'right'` for corresponding
window edges, or `'buffer'`. Defaults to `'right'`.

*scrollview_byte_limit*
scrollview_byte_limit |Number| specifying the buffer size threshold (in
bytes) for entering restricted mode, to prevent slow
operation. Defaults to `1,000,000`. Use `-1` for no limit.

*scrollview_character*
scrollview_character |String| specifying a character to display on scrollbars.
Defaults to `''`. Considered only at global scope.
Expand All @@ -107,6 +125,11 @@ scrollview_hide_on_intersect *scrollview_hide_on_intersect*
becomes hidden (not shown) when it would otherwise
intersect with a floating window. Defaults to `0`.

*scrollview_line_limit*
scrollview_line_limit |Number| specifying the buffer size threshold (in
lines) for entering restricted mode, to prevent slow
operation. Defaults to `20,000`. Use `-1` for no limit.

*scrollview_mode*
scrollview_mode |String| specifying what the scrollbar position and size
correspond to. See |scrollview-modes| for details on the
Expand All @@ -117,6 +140,12 @@ scrollview_on_startup |Boolean| |Number| specifying whether scrollbars are
enabled on startup. Defaults to `1`. Considered only at
global scope, when the plugin is loaded.

scrollview_out_of_bounds_adjust *scrollview_out_of_bounds_adjust*
|Boolean| |Number| specifying whether scrollbars and
signs beyond the window boundary (out-of-bounds) are
adjusted to be within the window (as opposed to not
showing).

*scrollview_winblend*
scrollview_winblend |Number| specifying the level of transparency for
scrollbars. Defaults to `50`. Must be between `0` (opaque)
Expand All @@ -137,6 +166,8 @@ example.
" Position the scrollbar at the 80th character of the buffer
let g:scrollview_base = 'buffer'
let g:scrollview_column = 80
" Enable all sign groups (defaults to ['diagnostics', 'search'])
let g:scrollview_signs_on_startup = ['all']
Lua Setup ~

Expand All @@ -149,7 +180,8 @@ options (the 'scrollview_' prefix is omitted). For example:
winblend = 75,
-- Position the scrollbar at the 80th character of the buffer
base = 'buffer',
column = 80
column = 80,
signs_on_startup = {'all'}
})
Scrollview Modes ~
Expand Down
9 changes: 8 additions & 1 deletion doc/tags
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
:ScrollViewDisable scrollview.txt /*:ScrollViewDisable*
:ScrollViewEnable scrollview.txt /*:ScrollViewEnable*
:ScrollViewFirst scrollview.txt /*:ScrollViewFirst*
:ScrollViewLast scrollview.txt /*:ScrollViewLast*
:ScrollViewNext scrollview.txt /*:ScrollViewNext*
:ScrollViewPrev scrollview.txt /*:ScrollViewPrev*
:ScrollViewRefresh scrollview.txt /*:ScrollViewRefresh*
:ScrollViewToggle scrollview.txt /*:ScrollViewToggle*
nvim-scrollview scrollview.txt /*nvim-scrollview*
scrollview-color-customization scrollview.txt /*scrollview-color-customization*
scrollview-commands scrollview.txt /*scrollview-commands*
Expand All @@ -20,13 +25,15 @@ scrollview.txt scrollview.txt /*scrollview.txt*
scrollview_auto_mouse scrollview.txt /*scrollview_auto_mouse*
scrollview_auto_workarounds scrollview.txt /*scrollview_auto_workarounds*
scrollview_base scrollview.txt /*scrollview_base*
scrollview_byte_limit scrollview.txt /*scrollview_byte_limit*
scrollview_character scrollview.txt /*scrollview_character*
scrollview_column scrollview.txt /*scrollview_column*
scrollview_current_only scrollview.txt /*scrollview_current_only*
scrollview_excluded_filetypes scrollview.txt /*scrollview_excluded_filetypes*
scrollview_hide_on_intersect scrollview.txt /*scrollview_hide_on_intersect*
scrollview_line_limit scrollview.txt /*scrollview_line_limit*
scrollview_mode scrollview.txt /*scrollview_mode*
scrollview_on_startup scrollview.txt /*scrollview_on_startup*
scrollview_refresh_time scrollview.txt /*scrollview_refresh_time*
scrollview_out_of_bounds_adjust scrollview.txt /*scrollview_out_of_bounds_adjust*
scrollview_winblend scrollview.txt /*scrollview_winblend*
scrollview_zindex scrollview.txt /*scrollview_zindex*

0 comments on commit 3b76cd7

Please sign in to comment.