some formatting
This commit is contained in:
parent
c91faa5aaf
commit
57c3bb3e61
21 changed files with 472 additions and 360 deletions
|
|
@ -1,123 +1,126 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.bufferline = let
|
||||
mouse = {
|
||||
right =
|
||||
# Lua
|
||||
"'vertical sbuffer %d'";
|
||||
close =
|
||||
# Lua
|
||||
''
|
||||
function(bufnum)
|
||||
require("mini.bufremove").delete(bufnum)
|
||||
end
|
||||
'';
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
options = {
|
||||
mode = "buffers";
|
||||
always_show_bufferline = true;
|
||||
buffer_close_icon = "";
|
||||
close_command.__raw = mouse.close;
|
||||
close_icon = "";
|
||||
diagnostics = "nvim_lsp";
|
||||
diagnostics_indicator =
|
||||
plugins.bufferline =
|
||||
let
|
||||
mouse = {
|
||||
right =
|
||||
# Lua
|
||||
"'vertical sbuffer %d'";
|
||||
close =
|
||||
# Lua
|
||||
''
|
||||
function(count, level, diagnostics_dict, context)
|
||||
local s = ""
|
||||
for e, n in pairs(diagnostics_dict) do
|
||||
local sym = e == "error" and " "
|
||||
or (e == "warning" and " " or "" )
|
||||
if(sym ~= "") then
|
||||
s = s .. " " .. n .. sym
|
||||
end
|
||||
end
|
||||
return s
|
||||
function(bufnum)
|
||||
require("mini.bufremove").delete(bufnum)
|
||||
end
|
||||
'';
|
||||
# Will make sure all names in bufferline are unique
|
||||
enforce_regular_tabs = false;
|
||||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
|
||||
groups = {
|
||||
options = {
|
||||
toggle_hidden_on_enter = true;
|
||||
settings = {
|
||||
options = {
|
||||
mode = "buffers";
|
||||
always_show_bufferline = true;
|
||||
buffer_close_icon = "";
|
||||
close_command.__raw = mouse.close;
|
||||
close_icon = "";
|
||||
diagnostics = "nvim_lsp";
|
||||
diagnostics_indicator =
|
||||
# Lua
|
||||
''
|
||||
function(count, level, diagnostics_dict, context)
|
||||
local s = ""
|
||||
for e, n in pairs(diagnostics_dict) do
|
||||
local sym = e == "error" and " "
|
||||
or (e == "warning" and " " or "" )
|
||||
if(sym ~= "") then
|
||||
s = s .. " " .. n .. sym
|
||||
end
|
||||
end
|
||||
return s
|
||||
end
|
||||
'';
|
||||
# Will make sure all names in bufferline are unique
|
||||
enforce_regular_tabs = false;
|
||||
|
||||
groups = {
|
||||
options = {
|
||||
toggle_hidden_on_enter = true;
|
||||
};
|
||||
|
||||
items = [
|
||||
{
|
||||
name = "Tests";
|
||||
highlight = {
|
||||
underline = true;
|
||||
fg = "#a6da95";
|
||||
sp = "#494d64";
|
||||
};
|
||||
priority = 2;
|
||||
# icon = "";
|
||||
matcher.__raw = ''
|
||||
function(buf)
|
||||
return buf.name:match('%test') or buf.name:match('%.spec')
|
||||
end
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "Docs";
|
||||
highlight = {
|
||||
undercurl = true;
|
||||
fg = "#ffffff";
|
||||
sp = "#494d64";
|
||||
};
|
||||
auto_close = false;
|
||||
matcher.__raw = ''
|
||||
function(buf)
|
||||
return buf.name:match('%.md') or buf.name:match('%.txt')
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
items = [
|
||||
indicator = {
|
||||
style = "icon";
|
||||
icon = "▎";
|
||||
};
|
||||
|
||||
left_trunc_marker = "";
|
||||
max_name_length = 18;
|
||||
max_prefix_length = 15;
|
||||
modified_icon = "●";
|
||||
|
||||
numbers.__raw = ''
|
||||
function(opts)
|
||||
return string.format('%s·%s', opts.raise(opts.id), opts.lower(opts.ordinal))
|
||||
end
|
||||
'';
|
||||
|
||||
persist_buffer_sort = true;
|
||||
right_mouse_command.__raw = mouse.right;
|
||||
right_trunc_marker = "";
|
||||
separator_style = "slant";
|
||||
show_buffer_close_icons = true;
|
||||
show_buffer_icons = true;
|
||||
show_close_icon = true;
|
||||
show_tab_indicators = true;
|
||||
sort_by = "extension";
|
||||
tab_size = 18;
|
||||
|
||||
offsets = [
|
||||
{
|
||||
name = "Tests";
|
||||
highlight = {
|
||||
underline = true;
|
||||
fg = "#a6da95";
|
||||
sp = "#494d64";
|
||||
};
|
||||
priority = 2;
|
||||
# icon = "";
|
||||
matcher.__raw = ''
|
||||
function(buf)
|
||||
return buf.name:match('%test') or buf.name:match('%.spec')
|
||||
end
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "Docs";
|
||||
highlight = {
|
||||
undercurl = true;
|
||||
fg = "#ffffff";
|
||||
sp = "#494d64";
|
||||
};
|
||||
auto_close = false;
|
||||
matcher.__raw = ''
|
||||
function(buf)
|
||||
return buf.name:match('%.md') or buf.name:match('%.txt')
|
||||
end
|
||||
'';
|
||||
filetype = "neo-tree";
|
||||
text = "File Explorer";
|
||||
text_align = "center";
|
||||
highlight = "Directory";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
indicator = {
|
||||
style = "icon";
|
||||
icon = "▎";
|
||||
};
|
||||
|
||||
left_trunc_marker = "";
|
||||
max_name_length = 18;
|
||||
max_prefix_length = 15;
|
||||
modified_icon = "●";
|
||||
|
||||
numbers.__raw = ''
|
||||
function(opts)
|
||||
return string.format('%s·%s', opts.raise(opts.id), opts.lower(opts.ordinal))
|
||||
end
|
||||
'';
|
||||
|
||||
persist_buffer_sort = true;
|
||||
right_mouse_command.__raw = mouse.right;
|
||||
right_trunc_marker = "";
|
||||
separator_style = "slant";
|
||||
show_buffer_close_icons = true;
|
||||
show_buffer_icons = true;
|
||||
show_close_icon = true;
|
||||
show_tab_indicators = true;
|
||||
sort_by = "extension";
|
||||
tab_size = 18;
|
||||
|
||||
offsets = [
|
||||
{
|
||||
filetype = "neo-tree";
|
||||
text = "File Explorer";
|
||||
text_align = "center";
|
||||
highlight = "Directory";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue