Shougo / deoplete.nvim

:stars: Dark powered asynchronous completion framework for neovim/Vim8
Other
5.94k stars 295 forks source link

Installation using built-in package manager #1177

Closed klimeryk closed 3 years ago

klimeryk commented 3 years ago

Vim 8 and NeoVim come with a built-in package manager. However, the way it works is that it loads all the "auto-start" plugins after loading the configuration file. So, Deoplete cannot be configured using the deoplete#custom#option function, as it's not available yet.

The solution is to make Deoplete an optional package and load it explicitly inside the configuration file.

This should prevent confusion like in https://github.com/Shougo/deoplete.nvim/issues/1152. Related issue: https://github.com/Shougo/deoplete.nvim/issues/990 (when not using any package managers).

Thanks for your work on this great plugin!

Shougo commented 3 years ago

Why do you write the instruction in README only?? Please add it in the help.

Shougo commented 3 years ago

@klimeryk Ping. No response? If so, I will close the issue.

klimeryk commented 3 years ago

Sorry, for the late response! 🙇 I did not think about adding the installation instructions to the help file since that one is available only after the plugin is installed?

Either way, I've since stopped using deoplete as it seemed to have had a significant impact on the battery life. I'll close this PR - at least if someone finds the linked issues or searches the issue/PR history, they should find some hints on how to proceed for the built-in package manager.

Thanks for having a look and thanks for all your work on deoplete! 🙇

Shougo commented 3 years ago

Either way, I've since stopped using deoplete as it seemed to have had a significant impact on the battery life.

Oh, OK.

klimeryk commented 3 years ago

Either way, I've since stopped using deoplete as it seemed to have had a significant impact on the battery life.

Just to be clear - I did not dig deeper what was the exact issue. I just noticed that my new MacBook Pro had ~3 hours battery life when working with just neovim from the terminal. Which seemed very odd. I figured it's one of the plugins causing it - and narrowed it down to deoplete. But I did not dig deeper - maybe it was the integration with ale (I still have ale itself running, though, without a significant battery drain). Afterwards, I had easily ~8 hours of battery time.

I just wanted to clarify this - once I realized it's deoplete, it actually made me realize I don't use autocompletion results anyway, so I just removed the plugin without digging deeper 🙇

Shougo commented 3 years ago

I think ale deoplete source has the battery drain.

https://github.com/dense-analysis/ale/blob/master/rplugin/python3/deoplete/sources/ale.py

You can disable ale source by ignore_sources option.

call deoplete#custom#option('ignore_sources', {'_': ['ale']})