comparison .chezmoitemplates/init.lua @ 688:6e98364a5a28

chore: convert chezmoi autocmds to lua
author zegervdv <zegervdv@me.com>
date Wed, 05 Oct 2022 08:56:58 +0200
parents a56cc75911b0
children 424764c7f51a
comparison
equal deleted inserted replaced
687:6aabd0b8d766 688:6e98364a5a28
1005 if vim.bo.buftype == 'terminal' then vim.cmd.stopinsert { bang = true } end 1005 if vim.bo.buftype == 'terminal' then vim.cmd.stopinsert { bang = true } end
1006 end, 1006 end,
1007 }, 1007 },
1008 }) 1008 })
1009 1009
1010 -- Apply changes in chezmoi managed files
1011 au.group('chezmoi', {
1012 { 'BufWritePost', os.getenv 'HOME' .. '/.local/share/chezmoi/*', 'silent !chezmoi apply --source-path %' },
1013 {
1014 'BufWritePost',
1015 os.getenv 'HOME' .. '/.local/share/chezmoi/.chezmoitemplates/init.lua',
1016 'silent !chezmoi apply --source-path $HOME/.local/share/chezmoi/dot_config/nvim/init.lua.tmpl',
1017 },
1018 })
1019
1010 -- Snippets 1020 -- Snippets
1011 local ls = require 'luasnip' 1021 local ls = require 'luasnip'
1012 -- Expand snippet or jump to next placeholder 1022 -- Expand snippet or jump to next placeholder
1013 vim.keymap.set({ 'i', 's' }, '<c-k>', function() 1023 vim.keymap.set({ 'i', 's' }, '<c-k>', function()
1014 if ls.expand_or_jumpable() then ls.expand_or_jump() end 1024 if ls.expand_or_jumpable() then ls.expand_or_jump() end