A comprehensive Neovim smooth motion plugin, providing fluid animations for all motion commands.
Combines smooth cursor movement, word navigation, text objects, and viewport scrolling into one seamless experience.
Smooth Animations
Extensive Movement Coverage
h
, j
, k
, l
, 0
, $
w
, b
, e
, W
, B
, E
f
, F
, t
, T
(supports counts){
, }
, (
, )
, %
gg
, G
, |
n
, N
gj
, gk
<C-d>
, <C-u>
, <C-f>
, <C-b>
, zz
, zt
, zb
Performance & Optimization
Flexible Configuration
linear
, ease-out
, ease-out-quad
)Comprehensive Command & API Support
:LuxMotionEnable
/ :LuxMotionDisable
/ :LuxMotionToggle
:LuxMotionPerformanceEnable
/ Disable
/ Toggle
Customization & Extensibility
Compatibility
{
"LuxVim/nvim-luxmotion",
config = function()
require("luxmotion").setup({
cursor = {
duration = 250,
easing = "ease-out",
enabled = true,
},
scroll = {
duration = 400,
easing = "ease-out",
enabled = true,
},
performance = { enabled = false },
keymaps = {
cursor = true,
scroll = true,
},
})
end,
}
use {
"LuxVim/nvim-luxmotion",
config = function()
require("luxmotion").setup()
end
}
Plug 'LuxVim/nvim-luxmotion'
Then in your init.lua
or init.vim
:
lua << EOF
require("luxmotion").setup()
EOF
require("luxmotion").setup({
cursor = {
duration = 250, -- Cursor animation duration (ms)
easing = "ease-out", -- Cursor easing function
enabled = true,
},
scroll = {
duration = 400, -- Scroll animation duration (ms)
easing = "ease-out", -- Scroll easing function
enabled = true,
},
performance = {
enabled = false, -- Enable performance mode
},
keymaps = {
cursor = true, -- Enable cursor motion keymaps
scroll = true, -- Enable scroll motion keymaps
},
})
:LuxMotionEnable
– Enable all animations:LuxMotionDisable
– Disable all animations:LuxMotionToggle
– Toggle all animations:LuxMotionEnableCursor
/ :LuxMotionDisableCursor
:LuxMotionEnableScroll
/ :LuxMotionDisableScroll
:LuxMotionPerformanceEnable
:LuxMotionPerformanceDisable
:LuxMotionPerformanceToggle
local luxmotion = require("luxmotion")
-- Global control
luxmotion.enable()
luxmotion.disable()
luxmotion.toggle()
-- Individual controls
luxmotion.enable_cursor()
luxmotion.disable_cursor()
luxmotion.enable_scroll()
luxmotion.disable_scroll()
-- Performance mode
local performance = require("luxmotion.performance")
performance.enable()
performance.disable()
performance.toggle()
performance.is_active()
-- Manual motion (if custom keymaps are used)
local cursor_keymaps = require("luxmotion.cursor.keymaps")
cursor_keymaps.smooth_move("j", 5)
cursor_keymaps.smooth_word_move("w", 3)
cursor_keymaps.smooth_find_move("f", "x", 2)
cursor_keymaps.smooth_text_object_move("}", 1)
require("luxmotion").setup({
keymaps = {
cursor = false,
scroll = false,
},
})
-- Define your own
local cursor_keymaps = require("luxmotion.cursor.keymaps")
vim.keymap.set("n", "j", function()
cursor_keymaps.smooth_move("j", vim.v.count1)
end)
require("luxmotion").setup({
cursor = {
duration = 100,
easing = "linear",
},
scroll = {
duration = 500,
easing = "ease-out",
},
})
require("luxmotion").setup({
cursor = {
duration = 150,
easing = "linear",
},
performance = { enabled = true },
})
Feature | luxmotion | neoscroll.nvim | vim-smoothie |
---|---|---|---|
Cursor Movement | ✅ | ❌ | ❌ |
Scroll Movement | ✅ | ✅ | ✅ |
Word Navigation | ✅ | ❌ | ❌ |
Find/Till Support | ✅ | ❌ | ❌ |
Text Objects | ✅ | ❌ | ❌ |
Search Navigation | ✅ | ❌ | ❌ |
Visual Mode | ✅ | ✅ (scroll) | ✅ (scroll) |
Count Prefixes | ✅ | ✅ (scroll) | ✅ (scroll) |
:LuxMotionPerformanceEnable
cursor = { duration = 100 }
linear
easing for fastest performancekeymaps = { cursor = false }
scrolloff
for large jumpsInspired by vim-smoothie and neoscroll.nvim.
MIT License – see LICENSE for details.