posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.82k stars 90 forks source link

Python code completion should be more useful #5413

Open ntluong95 opened 3 days ago

ntluong95 commented 3 days ago

System details:

Positron and OS details:

Positron Version: 2024.12.0 (system setup) build 41 Code - OSS Version: 1.93.0 Commit: 39536c265d6828a68291984d0d359170316d055e Date: 2024-11-18T02:47:00.983Z Electron: 30.4.0 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.22621

Interpreter details:

R 4.4.2 or Python 3.12.6

Describe the issue:

Steps to reproduce the issue:

  1. Import any pandas dataframe
  2. Write the name of dataset, type dot "." and press Ctrl+Enter to trigger code completion Image

Expected or desired behavior:

The code completion should prioritizing things to be displayed, i.e. column's name first, then methods, attributes.

Image

Should be related to this: https://github.com/posit-dev/positron/issues/5225

juliasilge commented 10 hours ago

This behavior comes from Jedi, so we are inheriting it from upstream. We could customize the Jedi behavior inside of Positron, or of course explore other options in the long run.