7689f8a270
- git - more keybindings - some fixes
28 lines
789 B
Lua
28 lines
789 B
Lua
local wk = require('which-key')
|
|
wk.add({{ '<Leader>g', group = 'Git' }})
|
|
wk.add({{ '<Leader>gc', group = 'commit' }})
|
|
wk.add({{ '<Leader>gp', group = 'pull' }})
|
|
wk.add({{ '<Leader>ga', group = 'add' }})
|
|
|
|
local gitgroup = vim.api.nvim_create_augroup('config_git', { clear = true })
|
|
-- enable spell check
|
|
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
|
group = gitgroup,
|
|
pattern = { 'gitcommit' },
|
|
command = [[setlocal spell]]
|
|
})
|
|
|
|
-- start in insert mode on line 1
|
|
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
|
group = gitgroup,
|
|
pattern = { 'gitcommit', 'gitrebase' },
|
|
command = [[startinsert | 1]]
|
|
})
|
|
|
|
-- don't mark whitespace characters
|
|
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
|
group = gitgroup,
|
|
pattern = { 'git' },
|
|
command = [[setlocal nolist]]
|
|
})
|