Git Product home page Git Product logo

vscode-tilt's Introduction

Official Tiltfile VSCode Extension

The Tiltfile extension provides an improved editing experience for Tiltfile authors.

This extension is currently in alpha state and might feel a bit buggy here and there. If you've encountered any issues, please check the known issues first and give the appropriate one a ๐Ÿ‘โ€. If your issue has not previously been reported, please add a new one.

Features

  • Starlark syntax highlighting
  • Autocomplete for Tiltfile functions
  • Signature support for Tiltfile functions
  • Hover support for docstrings
  • When Tilt is running, highlight Tiltfile execution errors in VSCode
  • VSCode status bar button to open the Tilt UI in a browser

Requirements

Dev Mode

  • To run the VSCode extension locally, check out our CONTRIBUTING guide

Extension Settings

This extension contributes the following settings:

Tiltfile

  • tiltfile.trace.server: Control the logging level for language server requests/responses (valid values: off (default), verbose, debug).
  • tiltfile.server.port: Set the number of the port where an existing Tilt language server is running. For use while developing the Tiltfile extension.
  • tiltfile.tilt.path: Set the path of the Tilt executable to use as the language server. Defaults to using the tilt binary that is found in the environment.
  • tiltfile.showStatusBarButton: Show a button in the VSCode status bar to open the Tilt WebUI. (default true)
  • tiltfile.tilt.webui.port: When opening the Tilt WebUI, the port to use (default 10350)

vscode-tilt's People

Contributors

nicksieger avatar landism avatar dependabot[bot] avatar milas avatar nicks avatar

Stargazers

David Adam Coffey avatar Teddy Xinyuan Chen avatar Lucas Marcolongo avatar Rohan Talip avatar Zane Helton avatar Julian Xhokaxhiu avatar Bruno Gomes avatar ymmedia avatar  avatar  avatar  avatar

Watchers

 avatar Dan Bentley avatar  avatar  avatar  avatar

Forkers

afrog33k

vscode-tilt's Issues

[Bug] Uncaught error: `Header must provide a Content-Length property.`

I got this error when installing the extension:

image

This appears to be a bug in the extension. When I mouse over any syntax in my Tiltfile, I get a tooltip that only says "Loading...", and when I check the "Runtime Status" again, I see a few more Header must provide a Content-Length property. uncaught errors.

image

Is there anything I can do as a fix or workaround? Thanks!

[Feature] Show summary of tilt status in VS Code Status bar

Hello Tilt team ๐Ÿ‘‹

The Web UI currently has a nice summary status at the top of the page:

It would be great if it was possible to see just these metrics in VS Code Status Bar as well:

This would allow us to focus on making edits, without switching to web UI or even the legacy terminal view.


Really appreciate the product though ๐Ÿ‘Œ

It is saving us huge amounts of time and this is greatly appreciated ๐Ÿ™

No syntax highlighting, and errors like "Connection got disposed"

I have a Tiltfile in my repo, and vscode-tilt installed. The extension itself is activated, because I can see the link to the Tilt UI in the status bar. However, the Tiltfile is not syntax highlighted. The language mode is listed as Plain Text and there is no option to set a file association of Tilt/Tiltfile/starlark.

Possibly related: this shows under output:

[Info  - 8:36:56 AM] Tiltfile LSP started
[Info  - 8:36:56 AM] Restarting server
[Info  - 8:36:56 AM] Found Tilt version 0.33.10
[Info  - 8:36:56 AM] Starting child process
Starlark LSP server initialized
[Error - 8:36:57 AM] Server initialization failed.
Error: Connection got disposed.
    at Object.dispose (/Users/me/.vscode/extensions/tilt-dev.tiltfile-0.0.3/out/extension.js:29:4041)
    at Object.dispose (/Users/me/.vscode/extensions/tilt-dev.tiltfile-0.0.3/out/extension.js:34:9518)
    at /Users/me/.vscode/extensions/tilt-dev.tiltfile-0.0.3/out/extension.js:36:6952
[Error - 8:36:57 AM] Starting client failed
Error: Connection got disposed.
    at Object.dispose (/Users/me/.vscode/extensions/tilt-dev.tiltfile-0.0.3/out/extension.js:29:4041)
    at Object.dispose (/Users/me/.vscode/extensions/tilt-dev.tiltfile-0.0.3/out/extension.js:34:9518)
    at /Users/me/.vscode/extensions/tilt-dev.tiltfile-0.0.3/out/extension.js:36:6952
[Info  - 8:36:57 AM] Tiltfile LSP started
[Info  - 8:36:57 AM] Found Tilt version 0.33.10
[Info  - 8:36:57 AM] Starting child process
Starlark LSP server initialized

[Feature] Enable Python formatting

Since the Tiltfile itself is written in Python it would be nice build in support for a "editor.defaultFormatter".

For now I found myself switching the Tiltfile language to Python, formatting, and then switching back in VSCode. I'm not sure if there is better way to do this.

I tried adding this to my settings.json but it does not see to help

    "[tiltfile]": {
        
        "editor.defaultFormatter": "ms-python.python"
    },

Go to Definition for extensions

The extension isn't able to navigate to definitions from Tilt extensions (load statements like load('ext://configmap')). Instead you get an error that the ext://... resource can't be resolved.

Consider publishing to Open VSX

Hi, thanks for the great extension, really enjoying Tilt ๐Ÿ—๏ธ so far!

Would you be open to publishing the extension to the Open VSX Registry so that it is available to things like GitPod and VS Codium? A while ago I was asked to publish an extension on Open VSX by a community member and when I finally got around to it ๐Ÿ˜…, it was very quick and easy.

You claim a namespace, which is your publisher name via a PR. Then click a couple times in your user account to create a publisher token. Lastly, use their CLI to publish your extension.

Anyway, thanks so much. Peace! โœŒ๏ธ

Support Cross-file operations

Currently, dependencies added to Tiltfile via load(), are not being traversed for autocomplete and signature support purposes

[Feature] Support Resolving Extension Repo References

Howdy ๐Ÿ‘‹๐Ÿป,

When referencing an v1alpha1.extension, using load(), that comes from an v1alpha1.extension_repo I am receiving:

loading extension env_args: no extension tiltfile found at /Users/iamnande/Library/Application Support/tilt-dev/tilt_modules/github.com/tilt-dev/tilt-extensions/env_args/Tiltfile

Example block that can produce the error:

## Extensions
v1alpha1.extension_repo('foo', url='https://github.com/iamnande/foo/tilt-extensions')
v1alpha1.extension(name='bar', repo_name='foo', repo_path='bar')
load('ext://bar', 'do_cool_thing')

It would be neat if it either didn't yell at me or if it resolved the extension.

Running tilt up in any form handles all the custom references just fine so no actual workflow is being impeded.

Connection to server is erroring

I'm running flatpak VS Code with a host-spawn tilt.

When enabling the extension I get:

[Info  - 3:21:06 PM] Tiltfile LSP started
tilt session watch: error processing session json: SyntaxError: Unexpected token 'E', "Error: No "... is not valid JSON
tilt session watch exited w/ code 1
[Info  - 3:21:07 PM] Found Tilt version 0.33.14
[Info  - 3:21:07 PM] Starting child process
[Error - 3:21:07 PM] Connection to server is erroring. Shutting down server.
tilt session watch: error processing session json: SyntaxError: Unexpected token 'E', "Error: No "... is not valid JSON
tilt session watch: error processing session json: SyntaxError: Unexpected token 'E', "Error: No "... is not valid JSON
tilt session watch: error processing session json: SyntaxError: Unexpected token 'E', "Error: No "... is not valid JSON
tilt session watch: error processing session json: SyntaxError: Unexpected token 'E', "Error: No "... is not valid JSON
tilt session watch: error processing session json: SyntaxError: Unexpected token 'E', "Error: No "... is not valid JSON
tilt session watch: error processing session json: SyntaxError: Unexpected token 'E', "Error: No "... is not valid JSON
...
...
...

Sadly I'm not able to extend the error message.

$ tilt doctor
Tilt: v0.33.14, built 2024-05-15
System: linux-amd64
---
Docker
- Host: unix:///run/user/1158/podman/podman.sock
- Server Version: 5.1.1
- API Version: 1.41
- Builder: 2
- Compose Version: v2.29.1
---
Kubernetes
- Env: kind
- Context: kind-kind
- Cluster Name: kind-kind
- Namespace: default
- Container Runtime: containerd
- Version: v1.30.0
- Cluster Local Registry: none
---
Thanks for seeing the Tilt Doctor!
Please send the info above when filing bug reports. ๐Ÿ’—

[Feature] Add support for changing search file name

Based on the FAQs, people who have installed rbenv or something similar may have followed the FAQs and renamed the tilt binary to tlt. However, this extension seems to only look for binaries under the name Tilt, which causes the following error:
image

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.