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

Webrepl autocomplete does not work for variables #2419

Closed
wohltat opened this issue Sep 1, 2022 · 7 comments
Closed

Webrepl autocomplete does not work for variables #2419

wohltat opened this issue Sep 1, 2022 · 7 comments
Milestone

Comments

@wohltat
Copy link

wohltat commented Sep 1, 2022

At first, i tried thonny and i like it as far as i've tried it. Very promising project.

Now to the issue.
Tab autocompletion does not work for variables although the variables are known to thonny since they appear in the 'Variables' panel on the right.
Autocomplete seems to work for keywords though.


Version 4.0.0
OS: manjaro (arch)

@aivarannamaa aivarannamaa added this to the 4.0.1 milestone Sep 2, 2022
@aivarannamaa
Copy link
Member

Thank you for the report!

Tab autocompletion does not work for variables although the variables are known to thonny since they appear in the 'Variables' panel on the right.

I assume you meant autocompletion in the Shell (because autocompletion in the editor only cares about variable definitions in the written code). Anyway, I've met similar problems both in the editor and shell and I'll try to fix them for the next release.

@wohltat
Copy link
Author

wohltat commented Sep 2, 2022

Btw in the editor the tab completion does not work like in the Shell.
It just inserts a tab character.

What about doing it like most other editors and interpreting the tab as completion key if there is text left of the cursor.

@aivarannamaa
Copy link
Member

What about doing it like most other editors and interpreting the tab as completion key if there is text left of the cursor.

This behavior can be turned on in "Tools => Options => Editor"

@wohltat
Copy link
Author

wohltat commented Sep 3, 2022

Oh, must have missed it.
Awesome its implemented already.

I vote for making this default.

@wohltat wohltat closed this as completed Sep 3, 2022
@aivarannamaa
Copy link
Member

Let's keep it open until I've fixed the problem with completing the variables.

@aivarannamaa aivarannamaa reopened this Sep 4, 2022
@wohltat
Copy link
Author

wohltat commented Sep 4, 2022

Yeah right. I just confused it with the Tab-completion issue i mixed in, which is solved now.

@aivarannamaa aivarannamaa modified the milestones: 4.0.1, 4.0.x Sep 11, 2022
@aivarannamaa aivarannamaa modified the milestones: 4.0.x, 4.0.3 Jan 26, 2023
@aivarannamaa
Copy link
Member

Thonny 4.1 will support name completions in the MicroPython / CircuitPython shell (again).

DanielLowry added a commit to DanielLowry/thonny that referenced this issue Apr 12, 2023
* Enhance esptool GUI, thonny#2707

* Windows fixes for esptool GUI, thonny#2707

* More forgiving image analysis for esptool GUI, thonny#2707

* black

* Misc fixes for esptool GUI, thonny#2707

* Use UDisks to find mounted filesystems on Linux (thonny#2683)

* Use UDisks to find volumes on Linux

This should generally work better on Linux than using the mount command directly.
UDisks is the utility that all major Linux desktop distributions use to handle mounting filesystems in userspace.
UDisks is accessible through a D-Bus API on the system bus.

D-Bus is complex and requires adding a dependency on a Python library for handling asynchronous communication with the bus.
I chose dbus-next since it is actively developed, modern, and doesn't require a glib main loop.
Since Thonny is not a Gtk application, it makes more sense to use native Python async functionality instead.

Inside a Flatpak, it's necessary to use UDisks via the D-Bus API to mount and check mounted filesystems.
The Flatpak sandbox prevents mounting otherwise and does not supply a mount command with the runtime.

* Smal fix for esptool GUI, thonny#2707

* Update CircuitPython links

* CircuitPython 8.1 stubs

* Small fixes for flasher dialogs, thonny#2707

* Update CREDITS.rst

* Restore MicroPython completions in the shell, thonny#2467, thonny#2419

* Rely on Jedi's builtins.pyi

* Fix MicroPython builtins completion

* Consider modules in project directory when completing

* Update MP links

* Refactor MP link collection

* Update MP links

* Require backend ACK before sending initial input

* Prepare for Python 3.12

* Update copyright year

* More Python version range fixes

* Simpler Python version display

* Move PROCESS_ACK

* Simpler Python interpreter selection

* Ensure Thonny's backends don't get confused by other installations, thonny#2616

* Alternative approach for thonny#2616

* Restore user site-packages for CPython backend, thonny#2616

* remove temp logging

* Experiment with module conflict detection, thonny#384

* Fixes for regressions caused by 4104729

---------

Co-authored-by: Aivar Annamaa <aivar.annamaa@gmail.com>
Co-authored-by: Jordan Williams <jordan@jwillikers.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants