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

60 lines
1.4 KiB
Lua

require('my/plugins')
require('my/keymaps')
require('my/tools')
packer.use { -- toggle comments
'https://github.com/tomtom/tcomment_vim',
config = function()
vim.g.tcomment_opleader1 = '<Leader>c'
vim.g.tcomment_mapleader1 = ''
vim.g.tcomment_mapleader2 = ''
end
}
packer.use {
'https://github.com/TimUntersberger/neogit',
requires = {
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/folke/which-key.nvim'
},
config = function()
require('which-key').setup {
-- commit_popup = {
-- kind = 'split'
-- }
}
end,
map('n', '<Leader>g', function()
require('neogit').open({ kind = "vsplit" })
end)
}
-- 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
}
packer.use {
'https://github.com/L3MON4D3/LuaSnip',
config = function()
require("luasnip.loaders.from_lua").load(
{ paths = vim.fn.stdpath('config') .. '/snippets'} )
end
}