Regarding auto-import feature #540
Unanswered
dpetka2001
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hey @dpetka2001, thanks for reporting. I'm not sure what's happening because I don't use this functionality. @tkrabel, any ideas about this one? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I installed
python3 -m pip install python-lsp-server
andpython3 -m pip install "python-lsp-server[rope]"
in my virtual environment to test out thepython-lsp-server
. I use Neovim and have configuredlspconfig
as followsWhen I open a python file in my virtual environment and type
floor
then I get completion for auto-importingmath
and when typingsleep
I get completion for auto-importingsleep
. However, when I typedatetime
I only get completion for auto-importingfrom xmlrpc.client import DateTime
.Am I maybe missing some configuration option to enable additional module preloading with pylsp and rope? From what I can see here, I believe that
datetime
module should be preloaded? Or maybe I have no idea what I'm talking about.Please excuse my ignorance as I'm still new to programming and grabbed Python as my first language to start. If I do
import datetime
, then I get completion about the modules that are available.Appreciate any help. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions