plugins/statuslines: move to by-name

This commit is contained in:
Matt Sturgeon 2024-09-05 02:42:01 +01:00
parent 82e7d153e4
commit d07a9c78cc
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
7 changed files with 0 additions and 4 deletions

View file

@ -0,0 +1,117 @@
{
empty = {
plugins.airline.enable = true;
};
example = {
plugins.airline = {
enable = true;
settings = {
section_a = "foo";
section_b = "foo";
section_c = "foo";
section_x = "foo";
section_y = "foo";
section_z = "foo";
experimental = 1;
left_sep = ">";
right_sep = "<";
detect_modified = 1;
detect_paste = 1;
detect_crypt = 1;
detect_spell = 1;
detect_spelllang = 1;
detect_iminsert = 0;
inactive_collapse = 1;
inactive_alt_sep = 1;
theme = "dark";
theme_patch_func = null;
powerline_fonts = 0;
symbols_ascii = 0;
mode_map = {
__ = "-";
c = "C";
i = "I";
ic = "I";
ix = "I";
n = "N";
multi = "M";
ni = "N";
no = "N";
R = "R";
Rv = "R";
s = "S";
S = "S";
t = "T";
v = "V";
V = "V";
};
exclude_filenames = [ ];
exclude_filetypes = [ ];
filetype_overrides = {
coc-explorer = [
"CoC Explorer"
""
];
defx = [
"defx"
"%{b:defx.paths[0]}"
];
fugitive = [
"fugitive"
"%{airline#util#wrap(airline#extensions#branch#get_head(),80)}"
];
gundo = [
"Gundo"
""
];
help = [
"Help"
"%f"
];
minibufexpl = [
"MiniBufExplorer"
""
];
startify = [
"startify"
""
];
vim-plug = [
"Plugins"
""
];
vimfiler = [
"vimfiler"
"%{vimfiler#get_status_string()}"
];
vimshell = [
"vimshell"
"%{vimshell#get_status_string()}"
];
vaffle = [
"Vaffle"
"%{b:vaffle.dir}"
];
};
exclude_preview = 0;
disable_statusline = 0;
skip_empty_sections = 1;
highlighting_cache = 0;
focuslost_inactive = 0;
statusline_ontop = 0;
stl_path_style = "short";
section_c_only_filename = 1;
symbols = {
branch = "";
colnr = " :";
readonly = "";
linenr = " :";
maxlinenr = " ";
dirty = "";
};
};
};
};
}

View file

@ -0,0 +1,148 @@
{
empty = {
plugins.lightline.enable = true;
};
defaults = {
plugins.lightline = {
enable = true;
settings = {
colorscheme = "default";
component_function = { };
component = {
mode = ''%{lightline#mode()}'';
absolutepath = "%F";
relativepath = "%f";
filename = "%t";
modified = "%M";
bufnum = "%n";
paste = ''%{&paste?"PASTE":""}'';
readonly = "%R";
charvalue = "%b";
charvaluehex = "%B";
fileencoding = ''%{&fenc!=#""?&fenc:&enc}'';
fileformat = ''%{&ff}'';
filetype = ''%{&ft!=#""?&ft:"no ft"}'';
percent = "%3p%%";
percentwin = "%P";
spell = ''%{&spell?&spelllang:""}'';
lineinfo = ''%3l=%-2c'';
line = "%l";
column = "%c";
close = "%999X X ";
winnr = ''%{winnr()}'';
};
active = {
left = [
[
"mode"
"paste"
]
[
"readonly"
"filename"
"modified"
]
];
right = [
[ "lineinfo" ]
[ "percent" ]
[
"fileformat"
"fileencoding"
"filetype"
]
];
};
inactive = {
left = [ [ "filename" ] ];
right = [
[ "lineinfo" ]
[ "percent" ]
];
};
tabline = {
left = [ [ "tabs" ] ];
right = [ [ "close" ] ];
};
tab = {
active = [
"tabnum"
"filename"
"modified"
];
inactive = [
"tabnum"
"filename"
"modified"
];
};
mode_map = {
"n" = "NORMAL";
"i" = "INSERT";
"R" = "REPLACE";
"v" = "VISUAL";
"V" = "V-LINE";
"\<C-v>" = "V-BLOCK";
"c" = "COMMAND";
"s" = "SELECT";
"S" = "S-LINE";
"\<C-s>" = "S-BLOCK";
"t" = "TERMINAL";
};
};
};
};
example = {
extraConfigLua = ''
function LightlineReadonly()
local is_readonly = vim.bo.readonly == 1
local filetype = vim.bo.filetype
if is_readonly and filetype ~= "help" then
return "RO"
else
return ""
end
end
'';
plugins.lightline = {
enable = true;
settings = {
colorscheme = "one";
component_function = {
gitbranch = "FugitiveHead";
readonly = "LightlineReadOnly";
};
component = {
charvaluehex = "0x%B";
lineinfo = "%3l:%-2v%<";
};
active = {
right = [
[ "lineinfo" ]
[ "percent" ]
[
"fileformat"
"fileencoding"
"filetype"
"charvaluehex"
]
];
};
inactive = null;
mode_map = {
"n" = "N";
"i" = "I";
"v" = "V";
"<C-v>" = "VB";
"<C-s>" = "SB";
};
};
};
};
}

View file

@ -0,0 +1,160 @@
{ pkgs, ... }:
{
empty = {
plugins.lualine.enable = true;
};
defaults = {
plugins.lualine = {
enable = true;
settings = {
options = {
icons_enabled = true;
theme = "auto";
component_separators = {
left = "";
right = "";
};
section_separators = {
left = "";
right = "";
};
always_divide_middle = true;
globalstatus = false;
refresh = {
statusline = 1000;
tabline = 1000;
winbar = 1000;
};
};
sections = {
lualine_a = [ "mode" ];
lualine_b = [
"branch"
"diff"
"diagnostics"
];
lualine_c = [ "filename" ];
lualine_x = [
"encoding"
"fileformat"
"filetype"
];
lualine_y = [ "progress" ];
lualine_z = [ "location" ];
};
inactive_sections = {
lualine_c = [ "filename" ];
lualine_x = [ "location" ];
};
};
};
};
example = {
extraPlugins = [ pkgs.vimPlugins.gruvbox-nvim ];
plugins.lualine = {
enable = true;
settings = {
options = {
component_separators = "|";
theme.__raw = ''
(function()
local custom_gruvbox = require("lualine.themes.gruvbox")
custom_gruvbox.normal.c.bg = '#112233'
return custom_gruvbox
end)()
'';
ignore_focus = [
"NvimTree"
"neo-tree"
];
disabled_filetypes = {
__unkeyed-1 = "startify";
winbar = [ "neo-tree" ];
};
};
sections = {
lualine_a = [
{
__unkeyed-1 = "mode";
separator.left = "";
padding.left = 2;
}
];
lualine_c = [
# you can specify only the sections you want to change
{
__unkeyed-1 = "filename";
icon = "-";
newfile_status = true;
path = 1;
shorting_target = 60;
}
];
lualine_z = [
{ __unkeyed-1 = "location"; }
{ __unkeyed-1 = "%L"; } # total lines
];
};
tabline = {
lualine_a = [
{
__unkeyed-1 = "buffers";
icon = {
__unkeyed-1 = "X";
align = "right";
};
mode = 4;
filetype_names = {
TelescopePrompt = "Telescope";
NvimTree = "NvimTree";
};
fmt = ''
function(value)
return value
end
'';
}
];
lualine_z = [
{
__unkeyed-1 = "tabs";
mode = 2;
}
];
};
extensions = [
"nvim-tree"
{
sections = {
lualine_a = [ "filename" ];
};
inactive_sections = {
lualine_x = [ "location" ];
};
filetypes = [ "markdown" ];
}
];
};
};
};
disabled-list = {
plugins.lualine = {
enable = true;
settings.options.disabled_filetypes = [
"neo-tree"
"startify"
];
};
};
no-packages = {
plugins.lualine = {
enable = true;
gitPackage = null;
};
};
}