mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-10 09:14:31 +02:00
plugins/statuslines: move to by-name
This commit is contained in:
parent
82e7d153e4
commit
d07a9c78cc
7 changed files with 0 additions and 4 deletions
|
@ -1,148 +0,0 @@
|
|||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue