-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Ask the IPython kernel for editor code completions #5252
Comments
@bcolsen, I think this solution would work only if users select the Run in dedicated console option. Else it'd create more confusion by not giving the right completions when users move from console to console to run their code. |
As @rlaverde, we will soon provide code completions via Language Server Protocol: #4751 (comment) |
As @bcolsen said:
Me too. Me too. Me too. (I have to say it 3 times to agree. For the time being, let's refer them as the Who most likely need this feature, and why?From the very first beginning I learned python, I found out a few things I needed to know are:
Most of the people using spyder are the people familiar with ipython, which are exactly the people wondering why the autocompletion works in ipython (console) but not spyder. And And spyder defines itself as The most working scenarios for the people described above:I know people use spyder and work with python in all different ways. For example, maybe expert programmers write hundreds of lines of codes, add breakpoints, run them, and debug. Maybe that's why so many people like pycharm and don't understand the popularity of ipython (I don't want to argue this with anyone whether I'm right or wrong). But there are also people analyzing data, who are not experts of python, who always need to look into the doc for names and parameters of many functions. They write a line of code or a cell of codes and execute them line by line or cell by cell ( It may be arguable that to make the Also the so many
|
There are several:
I know you're well intended and clearly want to help, but you don't understand what it means to run an open source project of this scale. Whatever solution we'd add to make this a reality (even an experimental one), we'd be forced to maintain it for years (two or three years, depending on the time we'd need to get a new major version) and to make it work as users expect. This has happened to us several times already, so I don't want to waste my time supporting a half-done solution.
In my mind, the LSP provides a real path to solve this the right way, and that's why we're putting so much effort on it. The problem is @andfoy (our LSP expert) is not working with us anymore because he's busy with his Master. My plan is to build an LSP plugin with an associated IPython kernel in the background. This plugin will parse the file, detect all definitions (like Unfortunately, we won't have time to do this for Spyder 4 because we already have a ton of other things to do. But it's in our plans for next year. |
But this doesn't matter, because I get your points of Thank you for your response. I like spyder. |
Closing as a duplicate of issue #2162. |
So here's an idea that might have been shot down before, but I think some people could like it. In fact after thinking about #2162, it seems people might even expect this behavior.
My usual work-flow involves writing a script in the editor and running it in the same ipython kernel without resetting the name-space. After running my script, I make changes in the editor. I find myself often copying a line of code from the editor into ipython to get the code completion from there, because it knows more about some of objects(eg. pandas and matplotlib) then jedi.
So I thought as a last resort it would be cool if Spyder did this automatically.
Basic Idea
The Problem
The completions might be for the wrong object if if that name is different in the current kernel. This should be infrequent, but it might be worse than I think. I can see the bug reports already. However, I think people could recognize the occasional wrong completion in exchange for any completion at all.
What do you think?
The text was updated successfully, but these errors were encountered: