-
Notifications
You must be signed in to change notification settings - Fork 45
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
[WIP] Jedi project sys.path manipulation #39
Conversation
@theangryangel I completely support this feature! And don't worry too much about this being "tested", this application's testing standards have been... regrettable so far. Honestly, I'm holding out for an LSP testing framework; until then, I just test manually with Regarding implementation, I agree with Since testing is minimal outside of static type checking / linting at this time, we should rely on statically-defined types as much as possible. Because of that, we should avoid mutating We should avoid overriding Finally, we can consider creating only 1 Jedi project on the Thanks for opening this PR and please let me know if you have any clarifying questions for me about the above! |
@theangryangel do you have time to work on this soon? If yes, I'll wait for you to respond to the above before implementing anything myself. |
Probably one evening this week, family permitting :) I realise it’s not a huge amount of work but I’m struggling to fit it in during work hours this week - thought it was going to be quiet but no such luck 😅 |
@theangryangel are you still working on this? I don't want to implement something if you're actively working on it, but I'm also happy to take it from here if your time is being occupied by other priorities |
Honestly just haven’t gotten around to it yet, if you wanna deal with the issue that’s not a problem 👍 |
@theangryangel I've added this feature. See: https://github.com/pappasam/coc-jedi#jediworkspaceextrapaths, or https://github.com/pappasam/jedi-language-server#configuration if you're not using |
Also, please let me know if you discover any bugs / inconsistencies with the documentation. |
At work I use an upstream project which is structured in a way where to get Jedi to autocomplete, etc. we need to modify the sys.path (I can explain more if required, but think a root project, with a vendors directory, almost). Under coc-python I use the python.autocomplete.extraPaths feature to get autocomplete, etc. working.
This is an extremely early implementation (no tests, total hack) to find out if you're happy with the concept of adding something like this to jedi-language-server. If yes I'll find a way to tidy it up, get some tests in, etc.
From a coc-jedi perspective adding
jedi.extraPaths: ['path1/', 'path2/']
to the project's coc-settings.json with this PR gets me working.