dotfiles/.config/nvim/lua/coding.lua
tastytea c307a4069f
nvim: load gentoo-syntax always
It defines so many filetypes, it's a headache to list them all.
2022-08-10 21:22:40 +02:00

46 lines
1.1 KiB
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>')
}
vim.api.nvim_create_augroup('config_coding', { clear = true })
vim.api.nvim_create_autocmd(
{ 'FileType' },
{
group = 'config_coding',
pattern = { 'gitcommit', 'gitrebase' },
callback = function()
-- FIXME: why does the autocmd in settings.lua not set it?
vim.wo.colorcolumn = tostring(vim.o.textwidth)
vim.cmd([[startinsert | 1]])
end
})
packer.use {
'https://github.com/gentoo/gentoo-syntax'
}
packer.use {
'https://github.com/jiangmiao/auto-pairs',
config = function()
vim.g.AutoPairsFlyMode = 0
end
}