VRED python script in vscode - autocompletion and linting

VRED python script in vscode - autocompletion and linting

Eduardt_AlbergEZ998
Participant Participant
627 Views
2 Replies
Message 1 of 3

VRED python script in vscode - autocompletion and linting

Eduardt_AlbergEZ998
Participant
Participant

Hello World,

I am addicted to linting and autocompletion. That's why I've been looking into how I can get the VRED Python libraries displayed correctly in vscode. My solution: stub files. Since all previous stub generators did not work in this context, I (and chatgpt) wrote one myself and refined the result handmade. The result is beautiful but not yet perfect.

preview_autocompletion.png

 

 

 

 

 

 

 

 

 

I have put the files in a public github repository so that anyone can use them. Different VRED versions should be handled with branches. The generated stub files must be in the vscode project folder under the folder "typings", then vscode will recognise them. You are invited to commit changes, extensions & corrections. You are also welcome to add a branch with a different version.

 

Accepted solutions (1)
628 Views
2 Replies
Replies (2)
Message 2 of 3

quirin.friedl
Enthusiast
Enthusiast
Accepted solution

Really nice! Thanks for sharing!

0 Likes
Message 3 of 3

chr33z
Advocate
Advocate

Hi @Eduardt_AlbergEZ998 

I'm a little bit late, but a long long time ago I created a VS Code extension to provide autocomplete and some documentation for VRED: VRED-Py 

I have to admit, it only really works well for API v1 and its really outdated by now. I found its quite difficult to provide good autocomplete for API v2.

 

Nice work! I like the idea of crawinling the modules in VRED. I did it the hard way by crawling the VRED python docs 😄

0 Likes