generated from LazyVim/starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcursor.lua
More file actions
118 lines (104 loc) · 6 KB
/
cursor.lua
File metadata and controls
118 lines (104 loc) · 6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
return {
{
"sphamba/smear-cursor.nvim",
opts = {
-- Smear cursor when switching buffers or windows.
--smear_between_buffers = true,
-- Smear cursor when moving within line or to neighbor lines.
-- Use `min_horizontal_distance_smear` and `min_vertical_distance_smear` for finer control
--smear_between_neighbor_lines = true,
-- Draw the smear in buffer space instead of screen space when scrolling
--scroll_buffer_space = true,
-- Set to `true` if your font supports legacy computing symbols (block unicode symbols).
-- Smears will blend better on all backgrounds.
--legacy_computing_symbols_support = false,
-- Smear cursor in insert mode.
-- See also `vertical_bar_cursor_insert_mode` and `distance_stop_animating_vertical_bar`.
--smear_insert_mode = true,
-- Smear cursor color. Defaults to Cursor GUI color if not set.
-- Set to "none" to match the text color at the target cursor position.
--cursor_color = "#ff8800",
--stiffness = 0.5,
--trailing_stiffness = 0.1,
--trailing_exponent = 5,
--never_draw_over_target = true,
--hide_target_hack = true,
--gamma = 1,
stiffness = 0.8,
trailing_stiffness = 0.49,
distance_stop_animating = 0.5,
},
},
{
'gen740/SmoothCursor.nvim',
lazy = false,
config = function()
require('smoothcursor').setup({
type = "matrix", -- Cursor movement calculation method, choose "default", "exp" (exponential) or "matrix".
cursor = "", -- Cursor shape (requires Nerd Font). Disabled in fancy mode.
texthl = "SmoothCursor", -- Highlight group. Default is { bg = nil, fg = "#FFD400" }. Disabled in fancy mode.
linehl = nil, -- Highlights the line under the cursor, similar to 'cursorline'. "CursorLine" is recommended. Disabled in fancy mode.
fancy = {
enable = false, -- enable fancy mode
head = { cursor = "▷", texthl = "SmoothCursor", linehl = nil }, -- false to disable fancy head
body = {
{ cursor = "", texthl = "SmoothCursorRed" },
{ cursor = "", texthl = "SmoothCursorOrange" },
{ cursor = "●", texthl = "SmoothCursorYellow" },
{ cursor = "●", texthl = "SmoothCursorGreen" },
{ cursor = "•", texthl = "SmoothCursorAqua" },
{ cursor = ".", texthl = "SmoothCursorBlue" },
{ cursor = ".", texthl = "SmoothCursorPurple" },
},
tail = { cursor = nil, texthl = "SmoothCursor" } -- false to disable fancy tail
},
matrix = { -- Loaded when 'type' is set to "matrix"
head = {
-- Picks a random character from this list for the cursor text
cursor = require('smoothcursor.matrix_chars'),
-- Picks a random highlight from this list for the cursor text
texthl = {
'SmoothCursor',
},
linehl = nil, -- No line highlight for the head
},
body = {
length = 6, -- Specifies the length of the cursor body
-- Picks a random character from this list for the cursor body text
cursor = require('smoothcursor.matrix_chars'),
-- Picks a random highlight from this list for each segment of the cursor body
texthl = {
'SmoothCursorGreen',
},
},
tail = {
-- Picks a random character from this list for the cursor tail (if any)
cursor = nil,
-- Picks a random highlight from this list for the cursor tail
texthl = {
'SmoothCursor',
},
},
unstop = false, -- Determines if the cursor should stop or not (false means it will stop)
},
autostart = true, -- Automatically start SmoothCursor
always_redraw = true, -- Redraw the screen on each update
flyin_effect = nil, -- Choose "bottom" or "top" for flying effect
speed = 25, -- Max speed is 100 to stick with your current position
intervals = 35, -- Update intervals in milliseconds
priority = 10, -- Set marker priority
timeout = 3000, -- Timeout for animations in milliseconds
threshold = 3, -- Animate only if cursor moves more than this many lines
max_threshold = nil, -- If you move more than this many lines, don't animate (if `nil`, deactivate check)
disable_float_win = false, -- Disable in floating windows
enabled_filetypes = nil, -- Enable only for specific file types, e.g., { "lua", "vim" }
disabled_filetypes = nil, -- Disable for these file types, ignored if enabled_filetypes is set. e.g., { "TelescopePrompt", "NvimTree" }
-- Show the position of the latest input mode positions.
-- A value of "enter" means the position will be updated when entering the mode.
-- A value of "leave" means the position will be updated when leaving the mode.
-- `nil` = disabled
show_last_positions = nil,
})
end
}
}