dotfiles/.config/nvim/lua/my/coding.lua
tastytea 4615f1f9c5
nvim: declare all plugins in one file
Having it in many files is logically nicer, but breaks on fresh
installs.
2022-08-15 04:06:26 +02:00

42 lines
905 B
Lua

require('my/plugins')
require('my/keymaps')
require('my/tools')
vim.g.tcomment_opleader1 = '<Leader>c'
vim.g.tcomment_mapleader1 = ''
vim.g.tcomment_mapleader2 = ''
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]]
})
require("luasnip.loaders.from_lua").load({
paths = vim.fn.stdpath('config') .. '/snippets'
})