1
0
Fork 0
chezmoi/dot_config/nvim/lua/configs/misc.lua
2022-11-03 15:05:24 +01:00

21 lines
1.1 KiB
Lua

-- {{{ LAYA
local aug = vim.api.nvim_create_augroup('laya', {})
vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
group = aug,
pattern = '~/jopixel/**/*.php',
callback = function()
vim.cmd.iabbrev({ args = { '<buffer>', 'TR', '$this->obtainer()->translator()->t();<Left><Left>' } })
vim.cmd.iabbrev({ args = { '<buffer>', 'TI', '$this->obtainer()->translator()->t()<Left>' } })
vim.cmd.iabbrev({ args = { '<buffer>', 'LOG', '$this->obtainer()->logger()->log();<Left><Left>' } })
vim.cmd.iabbrev({ args = { '<buffer>', 'DBG', "$this->obtainer()->logger()->log('debug', 'debug',);<Left><Left>" } })
vim.cmd.iabbrev({ args = { '<buffer>', 'PROD', '$this->producer()' } })
vim.cmd.iabbrev({ args = { '<buffer>', 'FILE', '$this->producer()->file()<Left>' } })
vim.cmd.iabbrev({ args = { '<buffer>', 'LINK', "$this->producer()->link($this, '')<Left><Left>" } })
vim.cmd.iabbrev({ args = { '<buffer>', 'NW', '$this->obtainer()->notifications()->warning();<Left><Left>' } })
vim.cmd.iabbrev({ args = { '<buffer>', 'NS', '$this->obtainer()->notifications()->success();<Left><Left>' } })
end
})
-- }}} LAYA