Closed rajcspsg closed 2 years ago
Could you check if it works correctly with dev
branch for you now? I updated dressing.nvim config.
dressing issue is not there in the dev branch. but the other issue with gitsigns still there.
"attempt to index field keymap (a nil value)"
As per the gitsigns README, the configuration currently used requires neovim v0.7 since it uses vim.keymap.set
.
Changing ~/.config/nvim/lua/plugins/gitsigns.lua
to
require('gitsigns').setup {
---omitted the rest of the config
on_attach = function(bufnr)
local function map(mode, lhs, rhs, opts)
opts = vim.tbl_extend('force', {noremap = true, silent = true}, opts or {})
vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts)
end
-- Navigation
map('n', ']c', "&diff ? ']c' : '<cmd>Gitsigns next_hunk<CR>'", {expr=true})
map('n', '[c', "&diff ? '[c' : '<cmd>Gitsigns prev_hunk<CR>'", {expr=true})
-- Actions
map('n', '<leader>hs', ':Gitsigns stage_hunk<CR>')
map('v', '<leader>hs', ':Gitsigns stage_hunk<CR>')
map('n', '<leader>hr', ':Gitsigns reset_hunk<CR>')
map('v', '<leader>hr', ':Gitsigns reset_hunk<CR>')
map('n', '<leader>hS', '<cmd>Gitsigns stage_buffer<CR>')
map('n', '<leader>hu', '<cmd>Gitsigns undo_stage_hunk<CR>')
map('n', '<leader>hR', '<cmd>Gitsigns reset_buffer<CR>')
map('n', '<leader>hp', '<cmd>Gitsigns preview_hunk<CR>')
map('n', '<leader>hb', '<cmd>lua require"gitsigns".blame_line{full=true}<CR>')
map('n', '<leader>tb', '<cmd>Gitsigns toggle_current_line_blame<CR>')
map('n', '<leader>hd', '<cmd>Gitsigns diffthis<CR>')
map('n', '<leader>hD', '<cmd>lua require"gitsigns".diffthis("~")<CR>')
map('n', '<leader>td', '<cmd>Gitsigns toggle_deleted<CR>')
-- Text object
map('o', 'ih', ':<C-U>Gitsigns select_hunk<CR>')
map('x', 'ih', ':<C-U>Gitsigns select_hunk<CR>')
end
}
should get rid of the error. Or you can update to a newer version of neovim.
@rajcspsg Were you able to fix your issues?
@ecosse3 yeap It fixes my issue
Hi @ecosse3
I'm getting below errors after updating config to latest commit
https://imgur.com/a/9jeKAwO
Any idea hw to fix these errors?