feat(commands): use new autocmd api
This commit is contained in:
parent
a10143d8d2
commit
7c1403438f
1 changed files with 7 additions and 5 deletions
|
@ -1,11 +1,13 @@
|
|||
local augroup_name = 'CosmicNvim'
|
||||
local group = vim.api.nvim_create_augroup(augroup_name, { clear = true })
|
||||
vim.api.nvim_create_autocmd('VimResized', {
|
||||
command = 'tabdo wincmd =',
|
||||
group = group,
|
||||
})
|
||||
|
||||
vim.cmd([[
|
||||
command! CosmicUpdate lua require('cosmic.utils').update()
|
||||
command! CosmicReload lua require('cosmic.utils').reload_user_config(true)
|
||||
command! CosmicReloadSync lua require('cosmic.utils').reload_user_config_sync()
|
||||
command! LspFormat lua vim.lsp.buf.formatting()
|
||||
|
||||
augroup Cosmic_Auto_Resize
|
||||
autocmd!
|
||||
autocmd VimResized * tabdo wincmd =
|
||||
augroup end
|
||||
]])
|
||||
|
|
Loading…
Add table
Reference in a new issue