Skip to content

Commit

Permalink
Update the doucumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Feb 6, 2024
1 parent f263c9c commit e7c0b39
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand All @@ -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",
Expand Down
9 changes: 6 additions & 3 deletions doc/dpp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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".

Expand All @@ -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.
Expand All @@ -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.

Expand Down

0 comments on commit e7c0b39

Please sign in to comment.