114 lines
2.9 KiB
Nix
114 lines
2.9 KiB
Nix
{ pkgs, ... }:
|
|
{
|
|
programs.nixvim = {
|
|
plugins.lualine = {
|
|
enable = true;
|
|
autoLoad = true;
|
|
settings = {
|
|
options = {
|
|
globalstatus = true;
|
|
ignore_focus = [
|
|
"neo-tree"
|
|
"nvim-tree"
|
|
"mini-files"
|
|
"TelescopePrompt"
|
|
];
|
|
};
|
|
sections = {
|
|
lualine_a = [
|
|
"mode"
|
|
];
|
|
lualine_b = [
|
|
"branch"
|
|
];
|
|
lualine_c = [
|
|
{
|
|
__unkeyed-1 = "filename";
|
|
newfile_status = true;
|
|
path = 3;
|
|
shorting_target = 150;
|
|
}
|
|
"diff"
|
|
];
|
|
lualine_x = [
|
|
"diagnostics"
|
|
{
|
|
__unkeyed-1 = {
|
|
__raw = ''
|
|
function()
|
|
local msg = ""
|
|
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
|
local clients = vim.lsp.get_active_clients()
|
|
if next(clients) == nil then
|
|
return msg
|
|
end
|
|
for _, client in ipairs(clients) do
|
|
local filetypes = client.config.filetypes
|
|
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
|
return client.name
|
|
end
|
|
end
|
|
return msg
|
|
end
|
|
'';
|
|
};
|
|
icon = "";
|
|
}
|
|
"copilot"
|
|
"encoding"
|
|
"fileformat"
|
|
"filetype"
|
|
];
|
|
lualine_y = [
|
|
{
|
|
__unkeyed-1 = "aerial";
|
|
colored = true;
|
|
cond = {
|
|
__raw = ''
|
|
function()
|
|
local buf_size_limit = 1024 * 1024
|
|
if vim.api.nvim_buf_get_offset(0, vim.api.nvim_buf_line_count(0)) > buf_size_limit then
|
|
return false
|
|
end
|
|
|
|
return true
|
|
end
|
|
'';
|
|
};
|
|
dense = false;
|
|
dense_sep = ".";
|
|
depth = {
|
|
__raw = "nil";
|
|
};
|
|
sep = " ) ";
|
|
}
|
|
];
|
|
lualine_z = [
|
|
{
|
|
__unkeyed-1 = "location";
|
|
}
|
|
];
|
|
};
|
|
tabline = {
|
|
lualine_a = [
|
|
{
|
|
__unkeyed-1 = "buffers";
|
|
symbols = {
|
|
alternate_file = "";
|
|
};
|
|
disabled_filetypes = [
|
|
"TelescopePrompt"
|
|
];
|
|
}
|
|
];
|
|
lualine_z = [
|
|
"tabs"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
extraPlugins = with pkgs.vimPlugins; [
|
|
copilot-lualine
|
|
];
|
|
};
|
|
}
|