Python autocomplete improvements (feature request)

Plugins for SynWrite and CudaText...
urlwolf
Posts: 9
Joined: 14.10.2018 07:23

Python autocomplete improvements (feature request)

Post by urlwolf »

Hi guys,

I love how light and fast cudatext it. Like the name too. I can't help but notice that the autocompletions for python are kinda poor (if working at all; it only has the stdlib and it's not context dependent). For a while I thought 'ok, this is an editor, not an IDE'. But then I realized that spyder, atom, vscode etc all have much better autocompletions.

It turns out lots has happened in the python world that could help making cudatext perform better autocompletions recently. See:

https://docs.python.org/3/library/inspect.html

You can get function signatures, on the fly. No need to precompute them in an .acp file that will be hopelessly incomplete!

You can also get the doc string. This would make it possible for cudatext to show both signature and docs on pressing ctrl space.

There's also rope : https://github.com/python-rope/rope/blo ... erview.rst

I suspect spyder, atom, vscode etc use these things to 'look' a lot more like an ide.

I want to keep the speed of cudatext, but would need those autocompletions too. Since plugins are in python, this would benefit the entire community. What do you think?
urlwolf
Posts: 9
Joined: 14.10.2018 07:23

Post by urlwolf »

urlwolf
Posts: 9
Joined: 14.10.2018 07:23

Post by urlwolf »

Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

> I can't help but notice that the autocompletions for python are kinda poor (if working at all; it only has the stdlib and it's not context dependent).
Of course.
User needs plugin Python IntelliSense to use OK completions. in Addon Manager.
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

urlwolf
Posts: 9
Joined: 14.10.2018 07:23

Post by urlwolf »

That's great news.
I installed, chose the python intrepreter. But I cannot replicate what you do in the gif.
No go to definition. Autocompletion after the dot proudces the same matches as before (the acp file matches).
What am I doing wrong?
urlwolf
Posts: 9
Joined: 14.10.2018 07:23

Post by urlwolf »

Also 'cannot find docstring'. Maybe I need to 'activate' it so it starts indexing the libraries?
urlwolf
Posts: 9
Joined: 14.10.2018 07:23

Post by urlwolf »

Ok, I got some things working. I see you have to press a shortcut to get autocompletion.
Is it possible to make it 'as you type'? See how vscode does it:
https://marketplace.visualstudio.com/it ... hon.python
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

user.json options

Go to definition by Ctrl+Alt+click: change option mouse_goto_definition
Auto completion by typing n chars: change opt autocomplete_autoshow_chars / autocomplete_trigger_chars
urlwolf
Posts: 9
Joined: 14.10.2018 07:23

Post by urlwolf »

Hmm, I read on settings.json that these params don't go into user.json. Where do they go? I couldn't find any lexer files with json extension.
Post Reply