From 84f0d2b0678f588cd80acc2a66500d00fc41c698 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 3 Feb 2023 22:53:48 +0300 Subject: [PATCH] feat: add scrollbar visual --- flake.lock | 17 +++++++++++++++++ flake.nix | 7 +++++++ modules/dashboard/alpha.nix | 5 +++-- modules/lib/types-plugin.nix | 1 + modules/statusline/lualine/lualine.nix | 2 +- modules/visuals/config.nix | 4 ++++ 6 files changed, 33 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index e2fcd3d..5605662 100644 --- a/flake.lock +++ b/flake.lock @@ -782,6 +782,7 @@ "registers": "registers", "rnix-lsp": "rnix-lsp", "rust-tools": "rust-tools", + "scrollbar-nvim": "scrollbar-nvim", "sqls-nvim": "sqls-nvim", "telescope": "telescope", "tidalcycles": "tidalcycles", @@ -833,6 +834,22 @@ "type": "github" } }, + "scrollbar-nvim": { + "flake": false, + "locked": { + "lastModified": 1673562030, + "narHash": "sha256-OnVOmYhWMWH7a382DAIPEzJmz/J0BHniey7twyl500Q=", + "owner": "petertriho", + "repo": "nvim-scrollbar", + "rev": "6a2065fbcd032075a06d2ab54508b69842bc4496", + "type": "github" + }, + "original": { + "owner": "petertriho", + "repo": "nvim-scrollbar", + "type": "github" + } + }, "sqls-nvim": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index a8b0c84..c90edae 100644 --- a/flake.nix +++ b/flake.nix @@ -62,6 +62,7 @@ vim.visuals = { enable = true; nvimWebDevicons.enable = true; + scrollBar.enable = true; lspkind.enable = true; indentBlankline = { enable = true; @@ -406,6 +407,12 @@ url = "github:yamatsum/nvim-cursorline"; flake = false; }; + + scrollbar-nvim = { + url = "github:petertriho/nvim-scrollbar"; + flake = false; + }; + indent-blankline = { url = "github:lukas-reineke/indent-blankline.nvim"; flake = false; diff --git a/modules/dashboard/alpha.nix b/modules/dashboard/alpha.nix index 7118e16..833ccdf 100644 --- a/modules/dashboard/alpha.nix +++ b/modules/dashboard/alpha.nix @@ -139,6 +139,7 @@ in { local default_header = { type = "text", val = { + [[███ ██ ███████ ██████ ██ ██ ██ ███ ███]], [[████ ██ ██ ██ ██ ██ ██ ██ ████ ████]], [[██ ██ ██ █████ ██ ██ ██ ██ ██ ██ ████ ██]], @@ -188,8 +189,8 @@ in { { type = "text", val = "Quick links", opts = { hl = "SpecialComment", position = "center" } }, { type = "padding", val = 1 }, dashboard.button("e", " New file", "ene"), - dashboard.button("SPC f", " Find file"), - dashboard.button("SPC F", " Live grep"), + dashboard.button("SPC F", " Find file"), + dashboard.button("SPC ff", " Live grep"), dashboard.button("SPC p", " Projects"), dashboard.button("q", " Quit", "qa"), }, diff --git a/modules/lib/types-plugin.nix b/modules/lib/types-plugin.nix index c591897..60c3f03 100644 --- a/modules/lib/types-plugin.nix +++ b/modules/lib/types-plugin.nix @@ -43,6 +43,7 @@ with lib; let "minimap-vim" "dashboard-nvim" "alpha-nvim" + "scrollbar-nvim" ]; pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package)); diff --git a/modules/statusline/lualine/lualine.nix b/modules/statusline/lualine/lualine.nix index 3911607..3b8f8d2 100644 --- a/modules/statusline/lualine/lualine.nix +++ b/modules/statusline/lualine/lualine.nix @@ -175,7 +175,7 @@ in { theme = "${cfg.theme}", component_separators = {"${cfg.componentSeparator.left}","${cfg.componentSeparator.right}"}, section_separators = {"${cfg.sectionSeparator.left}","${cfg.sectionSeparator.right}"}, - disabled_filetypes = {}, + disabled_filetypes = { 'packer', 'NvimTree', 'alpha' } }, sections = { lualine_a = ${cfg.activeSection.a}, diff --git a/modules/visuals/config.nix b/modules/visuals/config.nix index 2294f62..7231c86 100644 --- a/modules/visuals/config.nix +++ b/modules/visuals/config.nix @@ -12,6 +12,10 @@ with lib; { nvimWebDevicons.enable = mkDefault false; lspkind.enable = mkDefault false; + scrollBar = { + enable = mkDefault false; + }; + cursorWordline = { enable = mkDefault false; lineTimeout = mkDefault 500;