dotfiles/.config/nvim/lua/coding.lua

43 lines
1020 B
Lua

require('keymaps')
packer.use { -- toggle comments
'https://github.com/tomtom/tcomment_vim',
config = function()
map({ 'n', 'v' }, '<Leader>c', ':TComment<cr>')
end
}
packer.use {
'https://github.com/TimUntersberger/neogit',
requires = 'https://github.com/nvim-lua/plenary.nvim',
config = function()
require('which-key').setup {
-- commit_popup = {
-- kind = 'split'
-- }
}
end,
map('n', '<Leader>g', ':Neogit<cr>')
}
-- start git commits in insert mode
vim.api.nvim_create_augroup('config_coding', { clear = true })
vim.api.nvim_create_autocmd(
{ 'FileType' },
{
group = 'config_coding',
pattern = { 'gitcommit', 'gitrebase' },
command = [[startinsert | 1]]
})
packer.use {
'https://github.com/gentoo/gentoo-syntax'
}
packer.use {
'https://github.com/jiangmiao/auto-pairs',
config = function()
vim.g.AutoPairsFlyMode = 0
end
}