This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/kiyoonkim on 2024-09-03 08:18:22+00:00.


python-import.nvim can even resolve custom classes and methods.

It uses all of the below in order to find the best import statement:

  1. Pre-defined lookup table
  2. Search import statements used in the project already
  3. Pyright/basedpyright LSP

The video showcases a scenario when you just want to try a part of a code. Normally you’d copy the code and import statements separately to another file. With this plugin, you just need to copy the main body and then automatically add the import statements because it can look for existing import statements within the project.