Giter Site home page Giter Site logo

speed up check for pynvim about neovim HOT 7 CLOSED

arcxio avatar arcxio commented on June 26, 2024
speed up check for pynvim

from neovim.

Comments (7)

bfredl avatar bfredl commented on June 26, 2024 1

rm ~/.config/nvim/init.lua

Hmm, python provider is supposed to only be loaded on demand, not with (really) empty config. You might have some plugin in your runtimepath which checks has("python3") on startup. This can be disabled with nvim --clean +q

from neovim.

bfredl avatar bfredl commented on June 26, 2024 1

but I still think it's worth fixing the performance issue with calling python to check if pynvim is available so that it lowers startup time when using python plugins anyway.

such a check would just be an approximation. the only way to check if python can import a package is to invoke python and try to import the package. any external reimplementation of importlib/virtualenv/etc/etc is going to be out of date pretty much instantly given the frequent changes to the python tooling ecosystem.

Instead, a well-behaved python plugin should defer to check has("python3") until it actually needs to know that, not haphazardly at neovim startup.

from neovim.

arcxio avatar arcxio commented on June 26, 2024

You might have some plugin in your runtimepath which checks has("python3") on startup.

you're right, it seems that the AUR package neovim-nightly-bin which I use includes a bunch of vim plugins to runtimepath, including black.vim which triggers python provider, I may suggest them to fix it there. but I still think it's worth fixing the performance issue with calling python to check if pynvim is available so that it lowers startup time when using python plugins anyway.

from neovim.

justinmk avatar justinmk commented on June 26, 2024

Has been discussed many time before. The search doesn't happen unless your config triggers it.

from neovim.

clason avatar clason commented on June 26, 2024

it seems that the AUR package neovim-nightly-bin which I use includes a bunch of vim plugins to runtimepath

Wow. They should not do that. Please complain to them very loudly.

from neovim.

arcxio avatar arcxio commented on June 26, 2024

The search doesn't happen unless your config triggers it

the issue is not really that the search happens, the issue is that the search is much slower that it has to be

from neovim.

clason avatar clason commented on June 26, 2024

The search is the way it is for a reason, though: robustness (venv, pip, etc.).

from neovim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.