plugins.neoscroll.settings

Options provided to the require('neoscroll').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  cursor_scrolls_alone = true;
  easing_function = "quadratic";
  hide_cursor = true;
  mappings = [
    "<C-u>"
    "<C-d>"
    "<C-b>"
    "<C-f>"
    "<C-y>"
    "<C-e>"
    "zt"
    "zz"
    "zb"
  ];
  respect_scrolloff = false;
  stop_eof = true;
}

Declared by:

plugins.neoscroll.settings.cursor_scrolls_alone

The cursor will keep on scrolling even if the window cannot scroll further.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.neoscroll.settings.easing_function

Name of the easing function to use by default in all scrolling animamtions. scroll() that don’t provide the optional easing argument will use this easing function. If set to null (the default) no easing function will be used in the scrolling animation (constant scrolling speed).

Type: null or string or raw lua code

Default: null

Declared by:

plugins.neoscroll.settings.hide_cursor

If ‘termguicolors’ is set, hide the cursor while scrolling.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.neoscroll.settings.mappings

All the keys defined in this option will be mapped to their corresponding default scrolling animation. To no map any key pass an empty table:

  mappings.__empty = null;

Plugin default:

[
  "<C-u>"
  "<C-d>"
  "<C-b>"
  "<C-f>"
  "<C-y>"
  "<C-e>"
  "zt"
  "zz"
  "zb"
]

Type: null or (list of (string or raw lua code))

Default: null

Declared by:

plugins.neoscroll.settings.performance_mode

Option to enable “Performance Mode” on all buffers.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.neoscroll.settings.post_hook

Equivalent to pre_hook but the function will run after the scrolling animation ends.

Type: null or lua code string

Default: null

Declared by:

plugins.neoscroll.settings.pre_hook

Function to run before the scrolling animation starts. The function will be called with the info parameter which can be optionally passed to scroll() (or any of the provided wrappers). This can be used to conditionally run different hooks for different types of scrolling animations.

Type: null or lua code string

Default: null

Declared by:

plugins.neoscroll.settings.respect_scrolloff

The cursor stops at the scrolloff margin. Try combining this option with either stop_eof or cursor_scrolls_alone (or both).

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.neoscroll.settings.step_eof

When move_cursor is true scrolling downwards will stop when the bottom line of the window is the last line of the file.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by: