Does anyone have a VS Code stub or something for `...
# general
b
Does anyone have a VS Code stub or something for
BUILD
files? I like to have them set as the Python type to get autoformatting, but it's a sea of red because
python_sources
and such aren't defined
👀 1
b
I don't think so, but would love to be wrong 🙂 In the distant future I'm hoping to help out on a VS Code plugin 🎉
r
Someone had posted that VS code extension for Bazel BUILD files work also for pants.
b
It does somewhat, but doesn't work as well if you want to format with
black
(unless perhaps you configure the plugin to pretend
black
is
buildifier
🤔 )
👍 1
r
Yeah it just makes red stuff 💚
🟥 1
h
@fast-nail-55400 has been leading a project to add Java support to PyCharm using BSP (like LSP). Our hope is that this will be easily adapted to VSCode, which also supports BSP
f
current status on BSP: IntelliJ’s Scala plugin is able to speak BSP to the current support in Pants, although there is much work to be done yet. BSP and LSP uses the same wire protocol, so if someone wanted to explore an LSP server for Pants BUILD files, there’s a lot of work there but it could reuse the protocol work already done for BSP and just focus on implementing the necessary LSP methods.
🙌 1
b
thanks I'll try that out
f
please do! They even feature autocompletion!
b
Aside: I'm hoping to pick this up eventually: https://github.com/pantsbuild/pants/pull/14049
Then your resources get dependency-inferenced (in certain scenarios)
🙌 1