Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I check that autoImportModules set correctly? #210

Closed
SebastianBolte opened this issue Jun 23, 2022 · 2 comments
Closed

How can I check that autoImportModules set correctly? #210

SebastianBolte opened this issue Jun 23, 2022 · 2 comments

Comments

@SebastianBolte
Copy link

SebastianBolte commented Jun 23, 2022

Hi,

I'm using OmniSharp LSP Client to communicate with the jedi-language-server. I need to auto import a module (if I understand correctly, then I don't need to do "import theAutoImportedModule" in scripts where I use theAutoImportedModule). Because that seems not to work for me. How can I check that autoImportModules set correctly? Do I have to set the extraPaths or workspace folder to the path where the module is that I want to auto import? In the attachment you will find the logfile from jedi-language-server. By the way, is there a posibility to do autoImportModule what can do "from moduleIwantToAutoImport import *"?
JediLogfile.txt

@pappasam
Copy link
Owner

tl;dr I'm not exactly sure what you're asking, but see below for some information that may be helpful.

Hi there! autoImportModules is an optimization that speeds up autocompletion for complex modules. Jedi will actually execute import statements so you get fast auto completion.It does not prevent you from needing to type something like import mylib in your code. See here for documentation about its configuration if you're using coc-jedi: https://github.com/pappasam/coc-jedi#jedijedisettingsautoimportmodules

Since you're apparentlyusing another framework to interact with jedi-language-server, I suggest referring to that framework's documentation.

For your reference, autoImportModules is just a wrapper around this jedi configuration: https://jedi.readthedocs.io/en/latest/docs/settings.html#jedi.settings.auto_import_modules

Also, we do not support automatic generation of import statement lines. See here: #126

@SebastianBolte
Copy link
Author

Ok, thanks for your answer. I see that what I would like to do is not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants