This is a vs code extension. Learn how to write vs code extensions here: https://code.visualstudio.com/docs/extensions/overview
- Install
Node.js
usingbrew install node
/Windows equivalent. You should install at least version 6.x. - Navigate to this project directory and run
npm install
. You may also need to runnpm install -g npm
. - Open the folder containing this README.md in Visual Studio Code.
- Create an env/ folder in the loom folder, and create a file called discovery_credential.json.
- Place a Watson Discovery credential in the file.
- You'll also need a file called nlc_credential.json with an NLC credential.
- Go to the Debug menu in the left bar (4th icon down)
- Click the green Run arrow with Extension selected in the top-left bar
- Open the command bar using Shift-Command-P/Shift-Control-P and search for the appropriate command.
- With a supported filetype (currently only python), a "Weave Search" button is available at the top of the screen.
-
- This allows for direct search of Watson's services.
- When working with code, highlight a selection and right-click -> select "Lucky Weave".
-
- This will query Watson and display the first result.
- This can also be achieved with ctrl+shift+j with any selection (defaults to the current line)