Shougo / dpp.vim

Dark powered plugin manager for Vim/neovim
MIT License
128 stars 5 forks source link

What's `make_state()` and `load_state()` used for? #21

Closed Song-Tianxiang closed 5 months ago

Song-Tianxiang commented 5 months ago

Hello, thanks for all your great plugins.

It's not an issue, but I want to know, as title, What's make_state() and load_state() function used for?

I have read the help file, It seems like there need a cache file to hold dpp's state? What's the cache file do?

I have noticed the make_state() 2nd argument is config file path and the config file should be typescript file. Does it mean, I can not use this plugin if I don't know typescript.

I have read the help file but still have no idea about how to make this plugin work. Can you give me some basic idea about how dpp works. I'm familiar with vim's runtime path and pack path, but I think you have implement your own way to load plugins.

I want to dive into denops community but I have not program any typescript or javascript. Can you give me some advice to learn typescript and usedenops to program something. Basically, learn a new language is not hard for me.

I'm appreciate your work and thanks again.

Shougo commented 5 months ago

I have read the help file, It seems like there need a cache file to hold dpp's state? What's the cache file do?

The cache file is used to load plugins. Because dpp.vim does not use denops on startup(it is performance reason). dpp#make_state() is used to make startup script. It is similar with dein.vim architecture.

make_state -> generate startup script load_state -> execute startup script

I have noticed the make_state() 2nd argument is config file path and the config file should be typescript file. Does it mean, I can not use this plugin if I don't know typescript.

Yes.

Shougo commented 5 months ago

You can see my configuration file.

https://github.com/Shougo/shougo-s-github/blob/master/vim/rc/dpp.ts

Song-Tianxiang commented 5 months ago

Thank for your reply, I'll try to learn some typescript.

Shougo commented 5 months ago

You can see the documentation.

https://zenn.dev/shougo/articles/dpp-vim-beta

It is Japanese though.

Song-Tianxiang commented 5 months ago

Thanks again. I can read it with the help of google translate.