Skip to content

Commit dda826d

Browse files
committed
Add nvim-scrollbar for enhanced git change visualization
Features: - Scrollbar with git status indicators (additions, changes, deletions) - Cursor position tracking and LSP diagnostics - Excluded from file trees and popup windows - Integrates with existing gitsigns configuration
1 parent 18119ec commit dda826d

File tree

2 files changed

+155
-1
lines changed

2 files changed

+155
-1
lines changed

.claude/settings.local.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"BASH_DEFAULT_TIMEOUT_MS": "300000",
33
"permissions": {
44
"allow": [
5-
"Bash(git*)",
5+
"Bash(git:*)",
66
"Bash(ls:*)",
77
"mcp__code-reasoning__code-reasoning",
88
"mcp__sequential-thinking__sequentialthinking",
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
return {
2+
{
3+
"petertriho/nvim-scrollbar",
4+
event = "VeryLazy",
5+
config = function()
6+
require("scrollbar").setup({
7+
show = true,
8+
show_in_active_only = false,
9+
hide_if_all_visible = false,
10+
set_highlights = true,
11+
throttle_ms = 100,
12+
handle = {
13+
text = " ",
14+
blend = 30,
15+
color = nil,
16+
color_nr = nil,
17+
highlight = "CursorColumn",
18+
hide = false,
19+
},
20+
marks = {
21+
Cursor = {
22+
text = "",
23+
priority = 0,
24+
gui = nil,
25+
color = nil,
26+
cterm = nil,
27+
color_nr = nil,
28+
highlight = "Normal",
29+
},
30+
Search = {
31+
text = { "-", "=" },
32+
priority = 1,
33+
gui = nil,
34+
color = nil,
35+
cterm = nil,
36+
color_nr = nil,
37+
highlight = "Search",
38+
},
39+
Error = {
40+
text = { "-", "=" },
41+
priority = 2,
42+
gui = nil,
43+
color = nil,
44+
cterm = nil,
45+
color_nr = nil,
46+
highlight = "DiagnosticVirtualTextError",
47+
},
48+
Warn = {
49+
text = { "-", "=" },
50+
priority = 3,
51+
gui = nil,
52+
color = nil,
53+
cterm = nil,
54+
color_nr = nil,
55+
highlight = "DiagnosticVirtualTextWarn",
56+
},
57+
Info = {
58+
text = { "-", "=" },
59+
priority = 4,
60+
gui = nil,
61+
color = nil,
62+
cterm = nil,
63+
color_nr = nil,
64+
highlight = "DiagnosticVirtualTextInfo",
65+
},
66+
Hint = {
67+
text = { "-", "=" },
68+
priority = 5,
69+
gui = nil,
70+
color = nil,
71+
cterm = nil,
72+
color_nr = nil,
73+
highlight = "DiagnosticVirtualTextHint",
74+
},
75+
GitAdd = {
76+
text = "",
77+
priority = 7,
78+
gui = nil,
79+
color = nil,
80+
cterm = nil,
81+
color_nr = nil,
82+
highlight = "GitSignsAdd",
83+
},
84+
GitChange = {
85+
text = "",
86+
priority = 7,
87+
gui = nil,
88+
color = nil,
89+
cterm = nil,
90+
color_nr = nil,
91+
highlight = "GitSignsChange",
92+
},
93+
GitDelete = {
94+
text = "",
95+
priority = 7,
96+
gui = nil,
97+
color = nil,
98+
cterm = nil,
99+
color_nr = nil,
100+
highlight = "GitSignsDelete",
101+
},
102+
},
103+
excluded_buftypes = {
104+
"terminal",
105+
},
106+
excluded_filetypes = {
107+
"cmp_docs",
108+
"cmp_menu",
109+
"noice",
110+
"prompt",
111+
"TelescopePrompt",
112+
"alpha",
113+
"dashboard",
114+
"neo-tree",
115+
"NvimTree",
116+
"nvim-tree",
117+
"Trouble",
118+
"trouble",
119+
"lazy",
120+
"mason",
121+
"notify",
122+
"toggleterm",
123+
"lazyterm",
124+
},
125+
autocmd = {
126+
render = {
127+
"BufWinEnter",
128+
"TabEnter",
129+
"TermEnter",
130+
"WinEnter",
131+
"CmdwinLeave",
132+
"TextChanged",
133+
"VimResized",
134+
"WinScrolled",
135+
},
136+
clear = {
137+
"BufWinLeave",
138+
"TabLeave",
139+
"TermLeave",
140+
"WinLeave",
141+
},
142+
},
143+
handlers = {
144+
cursor = true,
145+
diagnostic = true,
146+
gitsigns = true,
147+
handle = true,
148+
search = false,
149+
ale = false,
150+
},
151+
})
152+
end,
153+
},
154+
}

0 commit comments

Comments
 (0)