mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-09 04:39:47 +01:00
Merge 41e5633550
into a1bac1d356
This commit is contained in:
commit
3fe5c3fba5
6 changed files with 180 additions and 0 deletions
17
flake.lock
17
flake.lock
|
@ -588,6 +588,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plugin-feline-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731467236,
|
||||||
|
"narHash": "sha256-/TqgHJo2ej/V5bubTdTlf5S+EZmSpU5F2Mdi0SHCD30=",
|
||||||
|
"owner": "freddiehaddad",
|
||||||
|
"repo": "feline.nvim",
|
||||||
|
"rev": "9f1313f61a75ec5ebe805fedd46bdc130c420963",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "freddiehaddad",
|
||||||
|
"repo": "feline.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"plugin-fidget-nvim": {
|
"plugin-fidget-nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -2133,6 +2149,7 @@
|
||||||
"plugin-dressing-nvim": "plugin-dressing-nvim",
|
"plugin-dressing-nvim": "plugin-dressing-nvim",
|
||||||
"plugin-elixir-tools": "plugin-elixir-tools",
|
"plugin-elixir-tools": "plugin-elixir-tools",
|
||||||
"plugin-fastaction-nvim": "plugin-fastaction-nvim",
|
"plugin-fastaction-nvim": "plugin-fastaction-nvim",
|
||||||
|
"plugin-feline-nvim": "plugin-feline-nvim",
|
||||||
"plugin-fidget-nvim": "plugin-fidget-nvim",
|
"plugin-fidget-nvim": "plugin-fidget-nvim",
|
||||||
"plugin-flutter-tools": "plugin-flutter-tools",
|
"plugin-flutter-tools": "plugin-flutter-tools",
|
||||||
"plugin-friendly-snippets": "plugin-friendly-snippets",
|
"plugin-friendly-snippets": "plugin-friendly-snippets",
|
||||||
|
|
|
@ -288,6 +288,12 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugin-feline-nvim = {
|
||||||
|
url = "github:freddiehaddad/feline.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Completion
|
||||||
plugin-nvim-cmp = {
|
plugin-nvim-cmp = {
|
||||||
url = "github:hrsh7th/nvim-cmp";
|
url = "github:hrsh7th/nvim-cmp";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./feline
|
||||||
./lualine
|
./lualine
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
21
modules/plugins/statusline/feline/config.nix
Normal file
21
modules/plugins/statusline/feline/config.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
|
||||||
|
cfg = config.vim.statusline.feline-nvim;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim = {
|
||||||
|
lazy.plugins.feline-nvim = {
|
||||||
|
event = "UIEnter";
|
||||||
|
|
||||||
|
package = "feline-nvim";
|
||||||
|
setupModule = "feline";
|
||||||
|
inherit (cfg) setupOpts;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/statusline/feline/default.nix
Normal file
6
modules/plugins/statusline/feline/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./feline.nix
|
||||||
|
];
|
||||||
|
}
|
129
modules/plugins/statusline/feline/feline.nix
Normal file
129
modules/plugins/statusline/feline/feline.nix
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (builtins) elem;
|
||||||
|
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||||
|
inherit (lib.types) str listOf attrsOf anything either submodule;
|
||||||
|
inherit (lib.lists) optional;
|
||||||
|
inherit (lib.generators) mkLuaInline;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
|
||||||
|
conditionalRenderers = {
|
||||||
|
options = {
|
||||||
|
filetypes = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [
|
||||||
|
"^NvimTree$"
|
||||||
|
"^neo-tree$"
|
||||||
|
"^startify$"
|
||||||
|
"^fugitive$"
|
||||||
|
"^fugitiveblame$"
|
||||||
|
"^qf$"
|
||||||
|
"^help$"
|
||||||
|
];
|
||||||
|
|
||||||
|
description = "Filetypes in which to force render inactive statusline";
|
||||||
|
};
|
||||||
|
|
||||||
|
buftypes = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = ["^terminal$"];
|
||||||
|
description = "Buffer types in which to force render inactive statusline";
|
||||||
|
};
|
||||||
|
|
||||||
|
bufnames = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [];
|
||||||
|
description = "Buffer names in which to force render inactive statusline";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options.vim.statusline.feline-nvim = {
|
||||||
|
enable = mkEnableOption "minimal, stylish and customizable statusline, statuscolumn, and winbar [feline.nvim]";
|
||||||
|
setupOpts = mkPluginSetupOption "feline-nvim" {
|
||||||
|
custom_providers = mkOption {
|
||||||
|
type = attrsOf anything;
|
||||||
|
default = {};
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
window_number = mkLuaInline ''''
|
||||||
|
function()
|
||||||
|
return tostring(vim.api.nvim_win_get_number(0))
|
||||||
|
end
|
||||||
|
'''';
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
description = "User-defined feline provider functions";
|
||||||
|
};
|
||||||
|
|
||||||
|
theme = mkOption {
|
||||||
|
type = either str (attrsOf str);
|
||||||
|
default = {};
|
||||||
|
example = {
|
||||||
|
fg = "#fff";
|
||||||
|
bg = "#111";
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
Either a string containing the color theme name or an attribute set of
|
||||||
|
strings, containing the colors.
|
||||||
|
|
||||||
|
The theme’s `fg` and `bg` values also represent the default foreground
|
||||||
|
and background colors, respectively.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
separators = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [];
|
||||||
|
example = ["slant_right_2"];
|
||||||
|
description = ''
|
||||||
|
A table containing custom Feline separator prests.
|
||||||
|
|
||||||
|
:::{.warning}
|
||||||
|
This option is not type-checked! Before setting this option, please take
|
||||||
|
a look at {command}`:help feline-separator-preset` for a list of
|
||||||
|
available separator presets.
|
||||||
|
:::
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
force_inactive = mkOption {
|
||||||
|
default = {};
|
||||||
|
type = attrsOf (submodule conditionalRenderers);
|
||||||
|
description = ''
|
||||||
|
A table that determines which buffers should always have the inactive
|
||||||
|
statusline, even when they are active.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
disable = mkOption {
|
||||||
|
default = {};
|
||||||
|
type = attrsOf (submodule conditionalRenderers);
|
||||||
|
description = ''
|
||||||
|
A table that determines which buffers should always have the statusline
|
||||||
|
disabled, even when they are active.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
vi_mode_colors = mkOption {
|
||||||
|
type = attrsOf str;
|
||||||
|
default = {};
|
||||||
|
description = ''
|
||||||
|
Attribute set containing colors associated with specific Vi modes.
|
||||||
|
|
||||||
|
It can later be used to get the color associated with the current Vim
|
||||||
|
mode using `require('feline.providers.vi_mode').get_mode_color()`.
|
||||||
|
|
||||||
|
See `:help feline-vi-mode` for more details on vi mode.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue