BoundaryML / baml

BAML is a language that helps you get structured data from LLMs, with the best DX possible. Works with all languages. Check out the promptfiddle.com playground
https://docs.boundaryml.com
Apache License 2.0
1.37k stars 50 forks source link

Add JetBrains Editor Support #889

Open invakid404 opened 3 months ago

invakid404 commented 3 months ago

Hi! I use JetBrains IDEs (WebStorm, PyCharm, RubyMine) please add support.

hellovai commented 3 months ago

We've had this request quite a bit, I'll take a look next week and report back with how much work we think this is.

@invakid404 would it work for you if we did something like this in the meanwhile:

The ability to baml-cli playground --port 3000 to spawn a webui synced to your local filesystem matching promptfiddle.com?

invakid404 commented 2 months ago

We've had this request quite a bit, I'll take a look next week and report back with how much work we think this is.

@invakid404 would it work for you if we did something like this in the meanwhile:

We offer a baml-cli playground --port 3000 command which would spawn a webui synced to your local filesystem matching promptfiddle.com?

I would personally be fine with a playground outside the IDE, yes. I still think a basic BAML plugin for JetBrains that adds language support (syntax highlighting, LSP) and no in-IDE playground would still be very useful so that I can at least read BAML files locally and click around.

sxlijin commented 2 months ago

Awesome to hear! I've filed #960 as a separate task, and we'll make sure to update you when we finish that.

In the meantime, we'll keep this issue open for other folks who want Jetbrains support to let us know. Some research ntoes about what we'd have to do:

invakid404 commented 2 months ago

Awesome to hear! I've filed #960 as a separate task, and we'll make sure to update you when we finish that.

In the meantime, we'll keep this issue open for other folks who want Jetbrains support to let us know. Some research ntoes about what we'd have to do:

  • Jetbrains custom language support docs are here
  • quick skim: Jetbrains doesn't support textmate/lezer grammars, it looks like we'd have to expose more out of the LSP
  • showing the preview would require some rearchitecture, since it's unclear how we'd embed the webview. could use JCEF (embedded chromium), but that's an experimental feature.

JetBrains IDEs support TextMate grammars via the TextMate plugin bundled with all JetBrains IDEs. Plugins can provide TextMate bundles by implementing TextMateBundleProvider.