feat nvim: add scrollview
This commit is contained in:
parent
d93ab2d409
commit
5c9b9fcb42
@ -1,157 +1,175 @@
|
|||||||
if true then return {} end -- 先停用
|
-- if true then return {} end -- 先停用
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{ "petertriho/nvim-scrollbar",
|
'dstein64/nvim-scrollview',
|
||||||
cond = true,
|
setup = function()
|
||||||
config = function()
|
require('scrollview').setup({
|
||||||
require("scrollbar").setup({
|
-- Default options
|
||||||
show = true,
|
current_only = true, -- Only show scroll indicator in current window
|
||||||
show_in_active_only = false,
|
winblend = 0, -- Blend of the scroll indicator
|
||||||
set_highlights = true,
|
-- base = 1, -- Base value for the scroll indicator
|
||||||
folds = 1000, -- handle folds, set to number to disable folds if no. of lines in buffer exceeds this
|
-- max_lines = 1000, -- Maximum number of lines to show the scroll indicator
|
||||||
max_lines = false, -- disables if no. of lines in buffer exceeds this
|
excluded_filetypes = { 'help', 'neo-tree' }, -- Filetypes to exclude from showing the scroll indicator
|
||||||
hide_if_all_visible = false, -- Hides everything if all lines are visible
|
base = 'buffer',
|
||||||
throttle_ms = 100,
|
-- column = 80,
|
||||||
handle = {
|
signs_on_startup = {'all'},
|
||||||
text = " ",
|
-- diagnostics_severities = {vim.diagnostic.severity.ERROR}
|
||||||
blend = 30, -- Integer between 0 and 100. 0 for fully opaque and 100 to full transparent. Defaults to 30.
|
|
||||||
color = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "CursorColumn",
|
|
||||||
hide_if_all_visible = true, -- Hides handle if all lines are visible
|
|
||||||
},
|
|
||||||
marks = {
|
|
||||||
Cursor = {
|
|
||||||
text = "•",
|
|
||||||
priority = 0,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "Normal",
|
|
||||||
},
|
|
||||||
Search = {
|
|
||||||
text = { "-", "=" },
|
|
||||||
priority = 1,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "Search",
|
|
||||||
},
|
|
||||||
Error = {
|
|
||||||
text = { "-", "=" },
|
|
||||||
priority = 2,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "DiagnosticVirtualTextError",
|
|
||||||
},
|
|
||||||
Warn = {
|
|
||||||
text = { "-", "=" },
|
|
||||||
priority = 3,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "DiagnosticVirtualTextWarn",
|
|
||||||
},
|
|
||||||
Info = {
|
|
||||||
text = { "-", "=" },
|
|
||||||
priority = 4,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "DiagnosticVirtualTextInfo",
|
|
||||||
},
|
|
||||||
Hint = {
|
|
||||||
text = { "-", "=" },
|
|
||||||
priority = 5,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "DiagnosticVirtualTextHint",
|
|
||||||
},
|
|
||||||
Misc = {
|
|
||||||
text = { "-", "=" },
|
|
||||||
priority = 6,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "Normal",
|
|
||||||
},
|
|
||||||
GitAdd = {
|
|
||||||
text = "┆",
|
|
||||||
priority = 7,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "GitSignsAdd",
|
|
||||||
},
|
|
||||||
GitChange = {
|
|
||||||
text = "┆",
|
|
||||||
priority = 7,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "GitSignsChange",
|
|
||||||
},
|
|
||||||
GitDelete = {
|
|
||||||
text = "▁",
|
|
||||||
priority = 7,
|
|
||||||
gui = nil,
|
|
||||||
color = nil,
|
|
||||||
cterm = nil,
|
|
||||||
color_nr = nil, -- cterm
|
|
||||||
highlight = "GitSignsDelete",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
excluded_buftypes = {
|
|
||||||
"terminal",
|
|
||||||
},
|
|
||||||
excluded_filetypes = {
|
|
||||||
"dropbar_menu",
|
|
||||||
"dropbar_menu_fzf",
|
|
||||||
"DressingInput",
|
|
||||||
"cmp_docs",
|
|
||||||
"cmp_menu",
|
|
||||||
"noice",
|
|
||||||
"prompt",
|
|
||||||
"TelescopePrompt",
|
|
||||||
},
|
|
||||||
autocmd = {
|
|
||||||
render = {
|
|
||||||
"BufWinEnter",
|
|
||||||
"TabEnter",
|
|
||||||
"TermEnter",
|
|
||||||
"WinEnter",
|
|
||||||
"CmdwinLeave",
|
|
||||||
"TextChanged",
|
|
||||||
"VimResized",
|
|
||||||
"WinScrolled",
|
|
||||||
},
|
|
||||||
clear = {
|
|
||||||
"BufWinLeave",
|
|
||||||
"TabLeave",
|
|
||||||
"TermLeave",
|
|
||||||
"WinLeave",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
handlers = {
|
|
||||||
cursor = true,
|
|
||||||
diagnostic = true,
|
|
||||||
gitsigns = false, -- Requires gitsigns
|
|
||||||
handle = true,
|
|
||||||
search = false, -- Requires hlslens
|
|
||||||
ale = false, -- Requires ALE
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- return {
|
||||||
|
-- { "petertriho/nvim-scrollbar",
|
||||||
|
-- cond = true,
|
||||||
|
-- config = function()
|
||||||
|
-- require("scrollbar").setup({
|
||||||
|
-- show = true,
|
||||||
|
-- show_in_active_only = false,
|
||||||
|
-- set_highlights = true,
|
||||||
|
-- folds = 1000, -- handle folds, set to number to disable folds if no. of lines in buffer exceeds this
|
||||||
|
-- max_lines = false, -- disables if no. of lines in buffer exceeds this
|
||||||
|
-- hide_if_all_visible = false, -- Hides everything if all lines are visible
|
||||||
|
-- throttle_ms = 100,
|
||||||
|
-- handle = {
|
||||||
|
-- text = " ",
|
||||||
|
-- blend = 30, -- Integer between 0 and 100. 0 for fully opaque and 100 to full transparent. Defaults to 30.
|
||||||
|
-- color = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "CursorColumn",
|
||||||
|
-- hide_if_all_visible = true, -- Hides handle if all lines are visible
|
||||||
|
-- },
|
||||||
|
-- marks = {
|
||||||
|
-- Cursor = {
|
||||||
|
-- text = "•",
|
||||||
|
-- priority = 0,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "Normal",
|
||||||
|
-- },
|
||||||
|
-- Search = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 1,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "Search",
|
||||||
|
-- },
|
||||||
|
-- Error = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 2,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "DiagnosticVirtualTextError",
|
||||||
|
-- },
|
||||||
|
-- Warn = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 3,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "DiagnosticVirtualTextWarn",
|
||||||
|
-- },
|
||||||
|
-- Info = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 4,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "DiagnosticVirtualTextInfo",
|
||||||
|
-- },
|
||||||
|
-- Hint = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 5,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "DiagnosticVirtualTextHint",
|
||||||
|
-- },
|
||||||
|
-- Misc = {
|
||||||
|
-- text = { "-", "=" },
|
||||||
|
-- priority = 6,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "Normal",
|
||||||
|
-- },
|
||||||
|
-- GitAdd = {
|
||||||
|
-- text = "┆",
|
||||||
|
-- priority = 7,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "GitSignsAdd",
|
||||||
|
-- },
|
||||||
|
-- GitChange = {
|
||||||
|
-- text = "┆",
|
||||||
|
-- priority = 7,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "GitSignsChange",
|
||||||
|
-- },
|
||||||
|
-- GitDelete = {
|
||||||
|
-- text = "▁",
|
||||||
|
-- priority = 7,
|
||||||
|
-- gui = nil,
|
||||||
|
-- color = nil,
|
||||||
|
-- cterm = nil,
|
||||||
|
-- color_nr = nil, -- cterm
|
||||||
|
-- highlight = "GitSignsDelete",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- excluded_buftypes = {
|
||||||
|
-- "terminal",
|
||||||
|
-- },
|
||||||
|
-- excluded_filetypes = {
|
||||||
|
-- "dropbar_menu",
|
||||||
|
-- "dropbar_menu_fzf",
|
||||||
|
-- "DressingInput",
|
||||||
|
-- "cmp_docs",
|
||||||
|
-- "cmp_menu",
|
||||||
|
-- "noice",
|
||||||
|
-- "prompt",
|
||||||
|
-- "TelescopePrompt",
|
||||||
|
-- },
|
||||||
|
-- autocmd = {
|
||||||
|
-- render = {
|
||||||
|
-- "BufWinEnter",
|
||||||
|
-- "TabEnter",
|
||||||
|
-- "TermEnter",
|
||||||
|
-- "WinEnter",
|
||||||
|
-- "CmdwinLeave",
|
||||||
|
-- "TextChanged",
|
||||||
|
-- "VimResized",
|
||||||
|
-- "WinScrolled",
|
||||||
|
-- },
|
||||||
|
-- clear = {
|
||||||
|
-- "BufWinLeave",
|
||||||
|
-- "TabLeave",
|
||||||
|
-- "TermLeave",
|
||||||
|
-- "WinLeave",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- handlers = {
|
||||||
|
-- cursor = true,
|
||||||
|
-- diagnostic = true,
|
||||||
|
-- gitsigns = false, -- Requires gitsigns
|
||||||
|
-- handle = true,
|
||||||
|
-- search = false, -- Requires hlslens
|
||||||
|
-- ale = false, -- Requires ALE
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
|
-- end
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user