From ea7bd48a22d8a7318ae4c841b18dbbaa5508ce92 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 28 Feb 2023 13:00:15 +0300 Subject: [PATCH 1/2] feat: feat: update flake inputs (28/02/2023) --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index e95038e..c1a9562 100644 --- a/flake.lock +++ b/flake.lock @@ -639,11 +639,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1677463842, - "narHash": "sha256-MgUEDPza573qKV59nRqrykLblPKBZu+DAIUqg9Pl5wU=", + "lastModified": 1677570356, + "narHash": "sha256-KbXK9ByJtuuO+NG/QOl5ULvSktqLq0IAF6DJjsgOO/Y=", "owner": "neovim", "repo": "neovim", - "rev": "2c9fbe34b20266ef5ab54f6ed14fb38eef60430d", + "rev": "8acb3d742ce68adadf1def9e1d1bb5bfd671988c", "type": "github" }, "original": { @@ -660,11 +660,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1677485761, - "narHash": "sha256-C04OWgNrCxPGUiT7Px/vZd42vfwRY6/EjHwHNUSHv7g=", + "lastModified": 1677572160, + "narHash": "sha256-DEEwY6si6ZNVAQePpNUooMTOH/mRe04XVqtTlYCWiE8=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "aad4d8be05012055861b097b8019311fe62635bf", + "rev": "4b2773ee687616104855a759a71591f875c29414", "type": "github" }, "original": { @@ -699,11 +699,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1677383253, - "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=", + "lastModified": 1677468890, + "narHash": "sha256-V4MPvt4PKaHSInRLWpaF8ICdC91SH+5bdd0FGxalJIg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9952d6bc395f5841262b006fbace8dd7e143b634", + "rev": "3f19c04354dec3903f614eae09327a04d297835d", "type": "github" }, "original": { @@ -1496,11 +1496,11 @@ "tokyonight": { "flake": false, "locked": { - "lastModified": 1675971703, - "narHash": "sha256-RjdzV2Ia0iWeTF3AaHBMop1jZPwR3SMHasbr9Lg7StE=", + "lastModified": 1677575009, + "narHash": "sha256-zZN+BsUI6Q745CbhV+QsCHURkBPXMLC9gLAhfp/32Ak=", "owner": "folke", "repo": "tokyonight.nvim", - "rev": "a0abe53df53616d13da327636cb0bcac3ea7f5af", + "rev": "588a8a27163478fd183037cc0f2e59ee39ad90f1", "type": "github" }, "original": { From db7aa9416138129357e9f9c113f747cbec4fe7eb Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 28 Feb 2023 13:00:38 +0300 Subject: [PATCH 2/2] feat: add fidget.nvim to visual plugins --- extra.nix | 1 + lib/types-plugin.nix | 1 + modules/visuals/config.nix | 17 +++++++++++++++++ modules/visuals/visuals.nix | 21 +++++++++++++++++++++ 4 files changed, 40 insertions(+) diff --git a/extra.nix b/extra.nix index fdaca8d..af04257 100644 --- a/extra.nix +++ b/extra.nix @@ -47,6 +47,7 @@ inputs: let scrollBar.enable = true; smoothScroll.enable = true; cellularAutomaton.enable = true; + fidget-nvim.enable = true; lspkind.enable = true; indentBlankline = { enable = true; diff --git a/lib/types-plugin.nix b/lib/types-plugin.nix index 646f4eb..7e863f8 100644 --- a/lib/types-plugin.nix +++ b/lib/types-plugin.nix @@ -69,6 +69,7 @@ with lib; let "comment-nvim" "kommentary" "mind-nvim" + "fidget-nvim" ]; # You can either use the name of the plugin or a package. pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package)); diff --git a/modules/visuals/config.nix b/modules/visuals/config.nix index 1835d46..b1824fa 100644 --- a/modules/visuals/config.nix +++ b/modules/visuals/config.nix @@ -44,6 +44,11 @@ in { then "cellular-automaton" else null ) + ( + if cfg.fidget-nvim.enable + then "fidget-nvim" + else null + ) ]; vim.luaConfigRC.visuals = nvim.dag.entryAnywhere '' @@ -135,6 +140,18 @@ in { '' else "" } + ${ + if cfg.fidget-nvim.enable + then '' + require"fidget".setup{ + align = { + bottom = ${boolToString cfg.fidget-nvim.align.bottom}, + right = ${boolToString cfg.fidget-nvim.align.right}, + } + } + '' + else "" + } ''; }; } diff --git a/modules/visuals/visuals.nix b/modules/visuals/visuals.nix index 6b3a121..43e48df 100644 --- a/modules/visuals/visuals.nix +++ b/modules/visuals/visuals.nix @@ -45,6 +45,27 @@ in { default = false; }; + fidget-nvim = { + enable = mkOption { + type = types.bool; + description = "enable nvim LSP UI element [fidget-nvim]"; + default = false; + }; + align = { + bottom = mkOption { + type = types.bool; + description = "align to bottom"; + default = true; + }; + + right = mkOption { + type = types.bool; + description = "align to right"; + default = true; + }; + }; + }; + cursorWordline = { enable = mkOption { type = types.bool;