Comments (8)
Removing
yadm = {
enable = false
}
solves the issue. I found it by trial and error. An error message indicating a solution or a more verbose commit message would have improved removing the error message. The help on yadm
pointing to gitsigns-config-on_attach_pre
but this term doesn't show up in the help at all.
To be honest, I don't know what yadm
is about. I use(d) kickstart.nvim
and should not have touched gitsigns
. Maybe it is completely obvious for people who know yadm
.
from gitsigns.nvim.
Welp, a bit of an awkward oversight from my part. Either way, thanks for your time, and apologies for taking it up.
from gitsigns.nvim.
If you don't use yadm, then why on earth did you configure it in gitsigns?
I strongly suggest you remove any configuration that repeats the defaults since you'll see this issue again. The more config you have, the more likely you are to have issues when config changes.
from gitsigns.nvim.
I use(d) it, because it was part of kickstart.nvim. For me, the point of kickstart.nvim is that I don't have to iterate over every plugin before using it – very handy when starting with Neovim.
from gitsigns.nvim.
kickstart.nvim should not be setting fields which are already default.
EDIT: not on master https://github.com/nvim-lua/kickstart.nvim/blob/19afab164183a5e80d8f7e7ae9df6b57e26a4a48/init.lua#L243-L259
from gitsigns.nvim.
Can't comment on that. It was nearly a year ago that I started using Neovim.
Anyway, does this all even matter? Before we continue another pointless discussion on the internet, I propose I close the issue and we are both happy that everything works. I, because I fixed it myself and you, because you had no work fixing anything. When you agree on that, you can also close the issue.
from gitsigns.nvim.
It's Back (6ef8c54)
I have debugged all my config after followed your instructions regarding yadm
, yet the warning keeps popping up:
This only appeared after updating. At first I thought it was an error concerning a fault in my code (there was, but it was unrelated). After debugging and fixing it, the same warning has kept popping up thus far.
I'll provide a sample of my configuration, but bear in mind I'm using customized modules for handling some stuff. Still, I've documented all the bits I've deemed relevant. If anything else is needed from my config please tell me.
--- ...
local Gsig = require('gitsigns')
---@type UserBufModeKeys
local keys = {
n = {
-- Navigati7on
{ lhs = '<leader>G]c', rhs = "&diff ? ']c' : '<CMD>Gitsigns next_hunk<CR>'", opts = { expr = true } },
{ lhs = '<leader>G[c', rhs = "&diff ? '[c' : '<CMD>Gitsigns prev_hunk<CR>'", opts = { expr = true } },
-- Actions
{ lhs = '<leader>Ghs', rhs = ':Gitsigns stage_hunk<CR>' },
{ lhs = '<leader>Ghr', rhs = ':Gitsigns reset_hunk<CR>' },
{ lhs = '<leader>GhS', rhs = '<CMD>Gitsigns stage_buffer<CR>' },
{ lhs = '<leader>Ghu', rhs = '<CMD>Gitsigns undo_stage_hunk<CR>' },
{ lhs = '<leader>GhR', rhs = '<CMD>Gitsigns reset_buffer<CR>' },
{ lhs = '<leader>Ghp', rhs = '<CMD>Gitsigns preview_hunk<CR>' },
{ lhs = '<leader>Ghb', rhs = '<CMD>lua require"gitsigns".blame_line{full=true}<CR>' },
{ lhs = '<leader>Gtb', rhs = '<CMD>Gitsigns toggle_current_line_blame<CR>' },
{ lhs = '<leader>Ghd', rhs = '<CMD>Gitsigns diffthis<CR>' },
{ lhs = '<leader>GhD', rhs = '<CMD>lua require"gitsigns".diffthis("~")<CR>' },
{ lhs = '<leader>Gtd', rhs = '<CMD>Gitsigns toggle_deleted<CR>' },
},
v = {
{ lhs = '<leader>Ghs', rhs = ':Gitsigns stage_hunk<CR>' },
{ lhs = '<leader>Ghr', rhs = ':Gitsigns reset_hunk<CR>' },
},
}
---@alias GitSignOpts { ['text']: string }
---@class GitSigns
---@field add GitSignOpts
---@field change GitSignOpts
---@field delete GitSignOpts
---@field topdelete GitSignOpts
---@field changedelete GitSignOpts
---@field untracked GitSignOpts
---@alias GitSignsArr GitSigns[]
---@type GitSigns
local signs = {
add = { text = '÷' },
change = { text = '~' },
delete = { text = '-' },
topdelete = { text = 'X' },
changedelete = { text = '≈' },
untracked = { text = '┆' },
}
Gsig.setup({
---@param bufnr integer
on_attach = function(bufnr)
for mode, v in next, keys do
---@type BufMapFunction
local func = bufmap[mode]
for _, t in next, v do
func(bufnr, t.lhs, t.rhs, t.opts or {})
end
end
end,
signs = signs,
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = true, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = { follow_files = true },
auto_attach = true,
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = false,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 5000,
ignore_whitespace = false,
virt_text_priority = 100,
},
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
sign_priority = 4,
update_debounce = 100,
-- status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
border = 'double',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1,
},
-- WARN: This causes a VERY annoying warning
-- each time Neovim starts.
-- See: [https://github.com/lewis6991/gitsigns.nvim/issues/965](this issue).
-- yadm = { enable = false },
})
--- ...
from gitsigns.nvim.
You know the commit you referenced is 4 months old?
from gitsigns.nvim.
Related Issues (20)
- Feature request: add the ability to ignore blank lines for git blames.
- Sign column not respecting colors from gruvbox HOT 3
- new line at end of file cause trace HOT 2
- If a line of code is too long and breaks, the gitsign lines should be continuous. HOT 1
- Neovim freezes for several seconds while performing some vim-fugitive operations HOT 16
- Error when deleting a buffer before `blame_line` loads
- Having problems with `gitsigns` and `nvim-colorizer` HOT 2
- Gitsigns fails to run `git --version` HOT 8
- `gitsigns_head` shows `nil` instead of revision
- Feature Request: Allow changing blame base. HOT 1
- gitsign cannot attach if nvim starts from "run" window HOT 2
- Attempt to index a nil value after executing "GDelete" HOT 2
- Syntax highlighting fails after opening linehl HOT 1
- Configuring git blame HOT 2
- Git current line blame overlap with text when split windows HOT 1
- git blame fails -- looks like the git command is incorrect HOT 3
- error in executing `:Gitsigns preview_hunk_inline ` HOT 2
- null-ls format panic when apply path PR#983 HOT 3
- Gitsigns assertion error in folder not using git HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitsigns.nvim.