34 lines
1.5 KiB
Lua
34 lines
1.5 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
|
|
|
|
--- terminal {{{
|
|
local termgroup = vim.api.nvim_create_augroup('terminal', { clear = true })
|
|
vim.api.nvim_create_autocmd('TermOpen', {
|
|
group = termgroup,
|
|
callback = function()
|
|
-- local buf = args.buf
|
|
vim.api.nvim_win_set_option(0, 'number', false)
|
|
vim.api.nvim_win_set_option(0, 'signcolumn', 'no')
|
|
vim.schedule(vim.cmd.startinsert) -- without schedule it lock screen refresh
|
|
end
|
|
})
|
|
--}}}
|