Skip to content

Commit

Permalink
Use ++nested for autocmds
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed May 27, 2024
1 parent 23f46bb commit dedaf86
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
6 changes: 3 additions & 3 deletions autoload/dpp/denops.vim
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function s:init() abort

augroup dpp
autocmd!
autocmd User DenopsPluginPost:dpp let s:initialized = v:true
autocmd User DenopsPluginPost:dpp ++nested let s:initialized = v:true
augroup END

let g:dpp#_started = reltime()
Expand All @@ -77,7 +77,7 @@ function s:init() abort
\ denops#server#status() ==# 'running')
call s:register()
else
autocmd dpp User DenopsReady call s:register()
autocmd dpp User DenopsReady ++nested call s:register()
endif
endfunction

Expand All @@ -98,7 +98,7 @@ function s:register() abort
\ [s:root_dir, 'denops', 'dpp', 'app.ts']->join(s:sep)
\ )

autocmd dpp User DenopsClosed call s:stopped()
autocmd dpp User DenopsClosed ++nested call s:stopped()
endfunction
function s:stopped() abort
unlet! s:initialized
Expand Down
2 changes: 1 addition & 1 deletion autoload/dpp/min.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ function dpp#min#_init() abort

augroup dpp
autocmd!
autocmd User Dpp:makeStatePost :
autocmd User Dpp:makeStatePost ++nested :
augroup END
endfunction
20 changes: 19 additions & 1 deletion doc/dpp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,16 @@ hook_add (String)
hook_depends_update (String)
It is executed after |dpp-plugin-option-depends| plugins are
updated.
NOTE: To use the feature, you need to install
"dpp-ext-installer".
https://github.com/Shougo/dpp-ext-installer

*dpp-plugin-option-hook_done_update*
hook_done_update (String)
It is executed after plugins are updated.
NOTE: To use the feature, you need to install
"dpp-ext-installer".
https://github.com/Shougo/dpp-ext-installer

*dpp-plugin-option-hook_post_source*
hook_post_source (String)
Expand All @@ -510,9 +516,12 @@ hook_post_source (String)
<
*dpp-plugin-option-hook_post_update*
hook_post_update (String)
It is executed after are updated and before
It is executed after updated and before
|dpp-plugin-option-build|.
NOTE: The plugin may not be sourced.
NOTE: To use the feature, you need to install
"dpp-ext-installer".
https://github.com/Shougo/dpp-ext-installer

*dpp-plugin-option-hook_source*
hook_source (String) or (Function)
Expand All @@ -534,12 +543,18 @@ lua_depends_update (String)
It is converted to |dpp-plugin-option-hook_depends_update|
key.
NOTE: It works only for neovim or |+lua|.
NOTE: To use the feature, you need to install
"dpp-ext-installer".
https://github.com/Shougo/dpp-ext-installer

*dpp-plugin-option-lua_done_update*
lua_done_update (String)
Lua language string hook instead of Vim script.
It is converted to |dpp-plugin-option-hook_done_update| key.
NOTE: It works only for neovim or |+lua|.
NOTE: To use the feature, you need to install
"dpp-ext-installer".
https://github.com/Shougo/dpp-ext-installer

*dpp-plugin-option-lua_post_source*
lua_post_sources (String)
Expand All @@ -552,6 +567,9 @@ lua_post_update (String)
Lua language string hook instead of Vim script.
It is converted to |dpp-plugin-option-hook_post_update| key.
NOTE: It works only for neovim or |+lua|.
NOTE: To use the feature, you need to install
"dpp-ext-installer".
https://github.com/Shougo/dpp-ext-installer

*dpp-plugin-option-lua_source*
lua_source (String)
Expand Down

0 comments on commit dedaf86

Please sign in to comment.