diff --git a/README.md b/README.md index 178e541..cff5ec3 100644 --- a/README.md +++ b/README.md @@ -66,17 +66,29 @@ const s:dpp_base = '~/.cache/dpp/' " NOTE: The plugins must be cloned before. const s:dpp_src = '~/.cache/dpp/repos/github.com/Shougo/dpp.vim' const s:denops_src = '~/.cache/dpp/repos/github.com/denops/denops.vim' +"const s:denops_installer = '~/.cache/dpp/repos/github.com/Shougo/dpp-ext-installer' " Set dpp runtime path (required) execute 'set runtimepath^=' .. s:dpp_src if s:dpp_base->dpp#min#load_state() " NOTE: dpp#make_state() requires denops.vim + " NOTE: denops.vim and dpp plugins are must be added execute 'set runtimepath^=' .. s:denops_src + "execute 'set runtimepath^=' .. s:denops_installer + autocmd User DenopsReady - \ call dpp#make_state(s:dpp_base, '{TypeScript config file path}') + \ : echohl WarningMsg + \ | echomsg 'dpp load_state() is failed' + \ | echohl NONE + \ | call dpp#make_state(s:dpp_base, '{TypeScript config file path}') endif +autocmd User Dpp:makeStatePost + \ : echohl WarningMsg + \ | echomsg 'dpp make_state() is done' + \ | echohl NONE + " Attempt to determine the type of a file based on its name and " possibly its " contents. Use this to allow intelligent " auto-indenting " for each filetype, and for plugins that are @@ -100,6 +112,7 @@ endif ```lua local dppSrc = "~/.cache/dpp/repos/github.com/Shougo/dpp.vim" local denopsSrc = "~/.cache/dpp/repos/github.com/denops/denops.vim" +--local denopsInstaller = "~/.cache/dpp/repos/github.com/Shougo/dpp-ext-installer" vim.opt.runtimepath:prepend(dppSrc) @@ -108,6 +121,7 @@ local dpp = require("dpp") local dppBase = "~/.cache/dpp" if dpp.load_state(dppBase) then vim.opt.runtimepath:prepend(denopsSrc) + --vim.opt.runtimepath:prepend(denopsInstaller) vim.api.nvim_create_autocmd("User", { pattern = "DenopsReady", diff --git a/doc/dpp.txt b/doc/dpp.txt index 4a042bf..4571f18 100644 --- a/doc/dpp.txt +++ b/doc/dpp.txt @@ -475,7 +475,8 @@ hooks_file (String) or (List) < *dpp-plugin-option-hook_add* hook_add (String) - It is executed after the line is parsed. + It is executed after the plugin is added. + It is mainly used for defining mappings. NOTE: You cannot call plugin function in "hook_add". Because the plugin is not sourced when "hook_add". @@ -490,7 +491,7 @@ hook_done_update (String) *dpp-plugin-option-hook_post_source* hook_post_source (String) - It is executed after plugins are sourced. + It is executed after the plugin script files are sourced. NOTE: In Vim initializing, you must call the "hook_post_source" hooks manually in |VimEnter| if needed. @@ -505,7 +506,9 @@ hook_post_update (String) *dpp-plugin-option-hook_source* hook_source (String) or (Function) - It is executed before plugins are sourced. + It is executed after plugin runtimepath is added and before + the plugin script files are sourced. + It is mainly used for plugin configure. NOTE: The "sourced" means after |dpp#min#load_state()| or when |VimEnter| or autoloaded.