-
-
Notifications
You must be signed in to change notification settings - Fork 236
Description
Description
After Executing :Lazy sync
, I receive the following error message when starting Neovim: gitsigns: Ignoring invalid configuration field 'on_attach_pre'
(s. attached screenshot), although I am not using this field anywhere.
I've seen in the changes of the last commit that some things concerning yadm
changed but I was not able to fix it myself. I also checked the help on yadm
. It refers to using on_attach_pre
instead but since the error message states the field is invalid, I am cueless.
Neovim version
NVIM v0.9.5 Build type: Release LuaJIT 2.1.1692716794
Operating system and version
Ubunut 22.04 LTS
Expected behavior
Neovim starts without printing an error message.
Actual behavior
Neovim starts and prints an error message although the mentioned field is not used anywhere.
Error message using my config:
Error message with minimal.lua
:
Minimal config
for name, url in pairs {
gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
-- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
} do
local install_path = vim.fn.fnamemodify('gitsigns_issue/' .. name, ':p')
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.opt.runtimepath:append(install_path)
end
require('gitsigns').setup {
debug_mode = true, -- You must add this to enable debug messages
signs = {
-- Colors may be changed via the according highlight groupd, check :h gitsigns-highlight-groups
add = { text = '+' },
change = { text = '~' },
delete = { text = '' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '┆' },
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
-- different highlight options
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
-- Watch changes
watch_gitdir = {
enable = true,
interval = 1000,
follow_files = true
},
attach_to_untracked = true,
-- Virtual text with information about the commit where it originates
-- current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame`
-- current_line_blame_opts = {
-- virt_text = true,
-- virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
-- delay = 1000,
-- ignore_whitespace = false,
-- },
-- current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
sign_priority = 6, -- should be below LSP signs
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
yadm = {
enable = false
},
}
Steps to reproduce
nvim --clean -u minimal.lua
- Start Neovim
Gitsigns debug messages
:Gitsigns debug_messages
run_job: git --version
run_job: git --no-pager --literal-pathspecs -c gc.auto=0 rev-parse --show-toplevel --absolute-git-dir --abbrev-ref HEAD
cli.run: Running action 'debug_messages' with arguments {}
Gitsigns dump_cache
{}