Skip to content

Commit

Permalink
terminal/editors/neovim: lualine disable navic on large buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jul 11, 2024
1 parent e9c5c88 commit 5e5fbcf
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,24 @@ in
};

winbar = {
lualine_c = [ "navic" ];
lualine_c = [
{
name = "navic";
extraConfig = {
cond.__raw = # Lua
''
function()
local buf_size_limit = 1024 * 1024 -- 1MB size limit
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
'';
};
}
];

# TODO: Need to dynamically hide/show component so navic takes precedence on smaller width
lualine_x = [
Expand Down

0 comments on commit 5e5fbcf

Please sign in to comment.