How to configure ignored and untracked_files options for git status? #2019
-
|
Is it possible to configure I see those being parameterized in neo-tree.nvim/lua/neo-tree/git/init.lua Line 185 in 4d0828d but I don't know how I should go about configuring them. The reason for this is performance related. NeoTree by default will fetch git status with the following flags:
Time it takes on the repo I'm working on: But ideally it should be this instead:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I do not see a documented top-level setup option for those two values. In the current source they are internal options to ignored = "traditional"
untracked_files = "normal"and then builds: The documented customization point that runs before the command executes is the require("neo-tree").setup({
event_handlers = {
{
event = "before_git_status",
handler = function(args)
for i, value in ipairs(args.status_args) do
if value:match("^%-%-ignored=") then
args.status_args[i] = "--ignored=no"
elseif value:match("^%-%-untracked%-files=") then
args.status_args[i] = "--untracked-files=no"
end
end
end,
},
},
})That is a workaround against current internals, not a stable first-class config API. If you want this as supported config, it probably needs a small feature change exposing those status args. |
Beta Was this translation helpful? Give feedback.
I do not see a documented top-level setup option for those two values. In the current source they are internal options to
make_git_status_cmd, which defaults to:and then builds:
The documented customization point that runs before the command executes is the
before_git_statusevent. If you need this immediately, you can mutate the generated args there: