From 1f86582d1c5c712cfb21988b908e1217dfd6270a Mon Sep 17 00:00:00 2001 From: declancm Date: Sat, 13 Jul 2024 23:56:44 +0000 Subject: [PATCH] chore(docs): auto-generate vimdoc --- doc/cinnamon.nvim.txt | 50 +++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/doc/cinnamon.nvim.txt b/doc/cinnamon.nvim.txt index 08793ee..a54d954 100644 --- a/doc/cinnamon.nvim.txt +++ b/doc/cinnamon.nvim.txt @@ -10,16 +10,17 @@ Table of Contents *cinnamon.nvim-table-of-contents* - Keymaps |cinnamon.nvim-keymaps| - API |cinnamon.nvim-api| - User Events |cinnamon.nvim-user-events| + - Disabling |cinnamon.nvim-disabling| FEATURES *cinnamon.nvim-features* -- Can add smooth scrolling to any normal mode movement, command, or Lua function +- Can add smooth cursor and window scroll animation to any normal mode movement, command, or Lua function - Horizontal, vertical, and diagonal scrolling - Adjusts scroll speed based on movement distance - Non-blocking delays using luv - Two scrolling modes: - - `cursor`Smoothly scrolls the cursor for any movement - - `window`Smoothly scrolls the window ONLY when the cursor moves out of view + - `cursor`animate cursor and window scrolling for any movement + - `window`animate window scrolling ONLY when the cursor moves out of view REQUIREMENTS *cinnamon.nvim-requirements* @@ -70,24 +71,24 @@ DEFAULT OPTIONS ~ -- Delay between each movement step (in ms) delay = 5, step_size = { - -- Default number of cursor/window lines moved per step + -- Number of cursor/window lines moved per step vertical = 1, - -- Default number of cursor/window columns moved per step + -- Number of cursor/window columns moved per step horizontal = 2, }, max_delta = { - -- Maximum distance for line movements before smooth - -- scrolling is skipped. Set to `false` to disable + -- Maximum distance for line movements before scroll + -- animation is skipped. Set to `false` to disable line = false, - -- Maximum distance for column movements before smooth - -- scrolling is skipped. Set to `false` to disable + -- Maximum distance for column movements before scroll + -- animation is skipped. Set to `false` to disable column = false, -- Maximum duration for a movement (in ms). Automatically scales the delay and step size time = 1000, }, -- The scrolling mode - -- `cursor`: Smoothly scrolls the cursor for any movement - -- `window`: Smoothly scrolls the window ONLY when the cursor moves out of view + -- `cursor`: animate cursor and window scrolling for any movement + -- `window`: animate window scrolling ONLY when the cursor moves out of view mode = "cursor", }, } @@ -114,7 +115,7 @@ KEYMAPS *cinnamon.nvim-keymaps* BASIC KEYMAPS ~ -**Smooth scrolling for …** +**Scroll animation for …** ----------------------------------------------------------------------- Category Keys @@ -133,7 +134,7 @@ BASIC KEYMAPS ~ EXTRA KEYMAPS ~ -**Smooth scrolling for …** +**Scroll animation for …** ----------------------------------------------------------------------- Category Keys @@ -165,6 +166,8 @@ DESCRIPTION ~ `require("cinnamon").scroll({command}, {options})` +Executes the given command with cursor and window scroll animation. + - `{command}` **(string|function)** Can be any of the following: - Normal mode movement command >lua @@ -192,7 +195,6 @@ EXAMPLES ~ >lua local cinnamon = require("cinnamon") - -- Setup the plugin with default options cinnamon.setup() -- Centered scrolling: @@ -222,8 +224,24 @@ USER EVENTS *cinnamon.nvim-user-events* - `CinnamonCmdPre` - Triggered before the given command is executed - `CinnamonCmdPost` - Triggered after the given command is executed -- `CinnamonScrollPre` - Triggered before the smooth scroll movement -- `CinnamonScrollPost` - Triggered after the smooth scroll movement +- `CinnamonScrollPre` - Triggered before the scroll animation +- `CinnamonScrollPost` - Triggered after the scroll animation + + +DISABLING *cinnamon.nvim-disabling* + +- `vim.b.cinnamon_disable` **(boolean)** Disable scroll animation for the current buffer +- `vim.g.cinnamon_disable` **(boolean)** Disable scroll animation globally + +Example Usage: + +>lua + -- Disable scrolling for help buffers + vim.api.nvim_create_autocmd("FileType", { + pattern = "help", + callback = function() vim.b.cinnamon_disable = true end, + }) +< Generated by panvimdoc