Coder Social home page Coder Social logo

td-completes-me's Introduction

TD Completes Me

Repo Logo

What is this?

This is a combo TOX/VSCode extension that leverages the Language Server protocol to send a list of context sensitive auto-completion items to Microsoft's Visual Studio Code.

What problem does this solve?

Creating extensive python scripts in Touch Designer can often be time consuming. We can use external editors like Sublime Text and VsCode but many of the features that make these tools beloved among traditional developers are not available to the Touch Designer programmer. This tool attempts to make editing the python scripts associated with Touch Designer projects a little more fluid and hopefully a little more joyful by implementing a (partial) autocompletion engine specific to the idioms of TD.

Features

  • op('') provides a list of operator names relative to the curent text DAT being edited

    OPS

  • get completions for CHOP channel names and DAT rows and cols!

DAT

  • parameter auto completion. get a list of availabe parameters by typing op('moviefilein1').par.

PAR

  • self.ownerComp is respected (as long as it's called ownerComp)

PAR

  • completions for custom extension and TD provided operator methods and members

MEMBER

Requirments

Right now only VSCode is supported. If there's interest we'll consider a Sublime Text addon.

TD builds > 2020.20020

Installation.

Clone or download this REPO and then head over to the BUILDS directory. There you'll find a .vsix extension and a tox. You can install the vsix extension by hitting control+shift+P and selecting extensions=>install from vsix. You can also download the latest version from the Release Page.

Contributing

Feel free! We(meaning me) are actively accepting pull requests.

Known Issues

Currently the td_completes_me uses a tcp based transport to communicate between Touch and VsCode. It will communicate by default on port 1338. If there is another process operating on this port then it will cause the extension to break. In practice this won't have any effect on editing your networks, you just won't get those sweet auto-completions!

Tested On

PC. It will probably work on a Mac.

Release Notes

0.3.0

Initial release.

0.3.1

fix warnings from external callback scripts

Enjoy!

td-completes-me's People

Contributors

dependabot[bot] avatar omarcostahamido avatar picturesbyrobots avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

td-completes-me's Issues

Basic TD Types not recognized

This is super awesome. I'd love to help make this our go-to Python editor tool.

First thing. It doesn't seem to recognize basic TD types, like op, COMP, DAT etc. All that stuff is in the main locals. I've never written an editor extension but I'm into it if you want a hand.

Hit me up at my personal email [email protected]

Cheers
Ivan DelSol
Head Python Wizard at Derivative

Hi!! Could you please help me with the using? Thank you so much!

So I had the .tox placed at the very root of the TD project, and I tried to do something in the perform COMP.

I also installed the .vsix and Python Official Extension in VSCode.

So how do I use the completion? I have newed a python file in VSCode and I typed op(''), and here is what it shows
image

Obviously the td-completes-me is working, or these stuff shall not be seen, but I don't know how to quote the component I am currently using in TD. I wanna get the completion of the transform1.translate.tx value. So I type these:
image
image
image
but any of them doesn't show the translate attribute:
image

So could you help me with my using? Thank you so much!!

Having difficulties to install td-completes-me.

I would love to use your autocompletion, it would speed up my work a lot. Somehow I am having difficulties to get it running..

  • From the latest Github Release, I downloaded the .tox file and the source code .zip with with the .vsix file.
  • From Visual Studio Code I succesfully installed the .vsix
  • I dropped the .tox into a new touchdesigner project

but the autocompletion doesn't appear when I open a td execute dat using visual studio code?

Sublime text!

If there's interest we'll consider a Sublime Text addon.
omg-yes

no autocomplete (command 'extension.tdCompletesMe.start_server' not found)

Hi I am not getting autocomplete functionality in vs and I see this error Command 'Touch Designer: Start AutoCompletion Engine' resulted in an error (command 'extension.tdCompletesMe.start_server' not found) vscode when I try to run the start command. I am inexperienced building extensions myself. Ihave tried disabling other plugins, but I cannot get vscode to converse with touchdesigner. I TD, the tcip dat says binding socket error access denied Any tips for where to look to solve the issue?

Thanks

textport spam

I'm getting some textport spam:

{'search_term': 'dat_SearchReplaceExt__td_15204_49.py', 'search_method': 'editing_file'}
repeated a bunch of times.

I think it's from line 423 of td_completes_me_ext.

If you use the function "debug" instead of "print" when you're sending debug info to the textport, it'll tell you what DAT and line the print came from. Super useful when you're just throwing stuff in to test, because if you forget to take it out you know exactly where the spam is coming from.

vsc settings.json

Hi!
Line in settings.json
"tdCompletesMe.connectType": null,
have an warning with
Incorrect type. Expected "string ".

Where I can find describe?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.