feat: add scrollbar visual

This commit is contained in:
NotAShelf 2023-02-03 22:53:38 +03:00
parent 7e69203390
commit 5d02e5d2e3
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1

View file

@ -24,6 +24,11 @@ in {
description = "enable vscode-like pictograms for lsp [lspkind]"; description = "enable vscode-like pictograms for lsp [lspkind]";
}; };
scrollBar.enable = mkOption {
type = types.bool;
description = "enable scrollbar [scrollbar.nvim]";
};
cursorWordline = { cursorWordline = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
@ -88,6 +93,11 @@ in {
then "indent-blankline" then "indent-blankline"
else null else null
) )
(
if cfg.scrollBar.enable
then "scrollbar-nvim"
else null
)
]; ];
vim.luaConfigRC.visuals = nvim.dag.entryAnywhere '' vim.luaConfigRC.visuals = nvim.dag.entryAnywhere ''
@ -130,6 +140,20 @@ in {
then "vim.g.cursorline_timeout = ${toString cfg.cursorWordline.lineTimeout}" then "vim.g.cursorline_timeout = ${toString cfg.cursorWordline.lineTimeout}"
else "" else ""
} }
${
if cfg.scrollBar.enable
then "require('scrollbar').setup{
excluded_filetypes = {
'prompt',
'TelescopePrompt',
'noice',
'NvimTree',
'alpha'
},
}"
else ""
}
''; '';
}; };
} }