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

67 lines
1.5 KiB
Lua

require('my/plugins')
require('my/keymaps')
require('my/tools')
packer.use { -- toggle comments
'https://github.com/tomtom/tcomment_vim',
-- tag = '*' -- reactivate when tagged after 2022-08-15
}
vim.g.tcomment_opleader1 = '<Leader>c'
vim.g.tcomment_mapleader1 = ''
vim.g.tcomment_mapleader2 = ''
packer.use {
'https://github.com/TimUntersberger/neogit',
requires = {
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/folke/which-key.nvim',
'https://github.com/sindrets/diffview.nvim'
},
}
local neogit = require('neogit')
neogit.setup {
disable_commit_confirmation = true,
kind = 'tab',
integrations = {
diffview = true
}
}
map('n', '<Leader>g', neogit.open)
-- 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]]
})
vim.api.nvim_create_autocmd(
{ 'FileType' },
{
group = 'config_coding',
pattern = { 'Neogit*' },
command = [[set nolist]]
})
packer.use 'https://github.com/gentoo/gentoo-syntax'
packer.use { -- NOTE: looks abandoned
'https://github.com/jiangmiao/auto-pairs',
config = function()
vim.g.AutoPairsFlyMode = 0
end
}
packer.use 'https://github.com/L3MON4D3/LuaSnip'
require("luasnip.loaders.from_lua").load({
paths = vim.fn.stdpath('config') .. '/snippets'
})