Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

How to have parameters and docs showing for code installed with codan develop or pip -e . #2088

Open
brando90 opened this issue Jun 24, 2020 · 8 comments
Labels
question A question about the LS

Comments

@brando90
Copy link

I have code I developed myself I can never see the definition of it as I type. How can I get help?

@brando90 brando90 added the question A question about the LS label Jun 24, 2020
@brando90
Copy link
Author

brando90 commented Jun 24, 2020

I have installed multiple packages in development mode. See my python path:

❯ python -c "import sys; [print(p) for p in sys.path]"

/Users/brandomiranda/miniconda3/envs/my-env/lib/python37.zip
/Users/brandomiranda/miniconda3/envs/my-env/lib/python3.7
/Users/brandomiranda/miniconda3/envs/my-env/lib/python3.7/lib-dynload
/Users/brandomiranda/miniconda3/envs/my-env/lib/python3.7/site-packages
/Users/brandomiranda/proj/my-proj
/Users/brandomiranda/ultimate-utils/ultimate-utils-project
/Users/brandomiranda/higher

However when I try to auto-complete to see docs, parameters etc for my own project it does not work (note intellicode does seem to suggest sensible things for Pytorch for the moment so I assume that is working and the docs for .tensor).

I press ^ space (control space) and it says:

No suggestions

in addition it does not shows a preview of the parameters or the docs (e.g. the docstrings I wrote for my own code).

I am mainly using conda develop . to install my editable code.

I saw other resources like:

but they don't seem to work for me. Besides, if I already have my packages installed in my conda environment as the print of the python environment path shows, I don't understand why I need to tell vscode manually again about them.

How can we make the IntelliSense feature work for my own code installed in editable mode?

@brando90
Copy link
Author

@jakebailey I have an issue where I can go to the declaration of the project in one place but not in the other (and also it never gives me suggestions for project I installed myself with conda develop . or even pip -e .).

What should I do?

e.g.

    import uutils.emailing #1
    from uutils.emailing import send_email, send_email_pdf_figs #2

with 1 I CANNOT go to the declaration with a right click but I CAN with 2 when I go to emailing.

@jakebailey
Copy link
Member

You used the question template, the issue template asks for a lot more info. The trace logs would be important to look at, for the paths being used. https://github.com/microsoft/python-language-server/blob/master/TROUBLESHOOTING.md#filing-an-issue

@brando90
Copy link
Author

https://github.com/microsoft/python-language-server/blob/master/TROUBLESHOOTING.md#filing-an-issue

there were no indications of that when I opened this issue fyi. I always check that sort of thing carefully.

@brando90
Copy link
Author

There is a warning where there is no code and the surrounding warning makes no sense:

Screen Shot 2020-06-25 at 2 37 25 PM

@jakebailey
Copy link
Member

Please, provide logs. The page I linked has the settings to enable trace logging and where to find it in VS Code.

@brando90
Copy link
Author

brando90 commented Jul 1, 2020

Please, provide logs. The page I linked has the settings to enable trace logging and where to find it in VS Code.

I will, sorry if I missed the instruction, I usually don't.

Meanwhile I have a question. If I open everything from my home directory were all my projects are, will that allow illi-code, the language server etc all those nice features work better?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question A question about the LS
Projects
None yet
Development

No branches or pull requests

2 participants