Merge pull request #25 from NotAShelf/feature/fidget.nvim

Feature/fidget.nvim
This commit is contained in:
NotAShelf 2023-02-28 10:03:33 +00:00 committed by GitHub
commit 16b1f7fe5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 12 deletions

View file

@ -47,6 +47,7 @@ inputs: let
scrollBar.enable = true; scrollBar.enable = true;
smoothScroll.enable = true; smoothScroll.enable = true;
cellularAutomaton.enable = true; cellularAutomaton.enable = true;
fidget-nvim.enable = true;
lspkind.enable = true; lspkind.enable = true;
indentBlankline = { indentBlankline = {
enable = true; enable = true;

View file

@ -639,11 +639,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1677463842, "lastModified": 1677570356,
"narHash": "sha256-MgUEDPza573qKV59nRqrykLblPKBZu+DAIUqg9Pl5wU=", "narHash": "sha256-KbXK9ByJtuuO+NG/QOl5ULvSktqLq0IAF6DJjsgOO/Y=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "2c9fbe34b20266ef5ab54f6ed14fb38eef60430d", "rev": "8acb3d742ce68adadf1def9e1d1bb5bfd671988c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -660,11 +660,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1677485761, "lastModified": 1677572160,
"narHash": "sha256-C04OWgNrCxPGUiT7Px/vZd42vfwRY6/EjHwHNUSHv7g=", "narHash": "sha256-DEEwY6si6ZNVAQePpNUooMTOH/mRe04XVqtTlYCWiE8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "aad4d8be05012055861b097b8019311fe62635bf", "rev": "4b2773ee687616104855a759a71591f875c29414",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -699,11 +699,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1677383253, "lastModified": 1677468890,
"narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=", "narHash": "sha256-V4MPvt4PKaHSInRLWpaF8ICdC91SH+5bdd0FGxalJIg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9952d6bc395f5841262b006fbace8dd7e143b634", "rev": "3f19c04354dec3903f614eae09327a04d297835d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1496,11 +1496,11 @@
"tokyonight": { "tokyonight": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1675971703, "lastModified": 1677575009,
"narHash": "sha256-RjdzV2Ia0iWeTF3AaHBMop1jZPwR3SMHasbr9Lg7StE=", "narHash": "sha256-zZN+BsUI6Q745CbhV+QsCHURkBPXMLC9gLAhfp/32Ak=",
"owner": "folke", "owner": "folke",
"repo": "tokyonight.nvim", "repo": "tokyonight.nvim",
"rev": "a0abe53df53616d13da327636cb0bcac3ea7f5af", "rev": "588a8a27163478fd183037cc0f2e59ee39ad90f1",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -69,6 +69,7 @@ with lib; let
"comment-nvim" "comment-nvim"
"kommentary" "kommentary"
"mind-nvim" "mind-nvim"
"fidget-nvim"
]; ];
# You can either use the name of the plugin or a package. # You can either use the name of the plugin or a package.
pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package)); pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package));

View file

@ -44,6 +44,11 @@ in {
then "cellular-automaton" then "cellular-automaton"
else null else null
) )
(
if cfg.fidget-nvim.enable
then "fidget-nvim"
else null
)
]; ];
vim.luaConfigRC.visuals = nvim.dag.entryAnywhere '' vim.luaConfigRC.visuals = nvim.dag.entryAnywhere ''
@ -135,6 +140,18 @@ in {
'' ''
else "" 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 ""
}
''; '';
}; };
} }

View file

@ -45,6 +45,27 @@ in {
default = false; 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 = { cursorWordline = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;