Open thamenato opened 4 years ago
syntax highlight for pants.toml files
For pants.toml
, have you set up the TOML support for VS Code? PyCharm's is quite nice. Or do you mean you further want the VSCode plugin to validate the config file?
By the way, check out BSP (build-server protocol). It's like LSP, but for build tools. https://github.com/build-server-protocol/build-server-protocol
Rather than doing a VSCode plugin, I think we'd want to integrate with BSP so that we get support for many editors all in one. I believe @cosmicexplorer has checked out BSP in the past?
For pants.toml, have you set up the TOML support for VS Code? PyCharm's is quite nice. Or do you mean you further want the VSCode plugin to validate the config file?
I do have TOML support, and yes it is really nice 😄 but I meant more of the available tags and it's properties. Sort of it I press cmd+space
it'll show me: GLOBAL, source, python-repos, etc... and when I'm inside [GLOBAL] it would show me / auto-complete dynamic_ui
, pantsd
, etc...
Rather than doing a VSCode plugin, I think we'd want to integrate with BSP so that we get support for many editors all in one. I believe @cosmicexplorer has checked out BSP in the past?
That's actually a pretty good idea. I'm a VIM user so I won't complain there! I'll investigate that and chat with @cosmicexplorer .
To add, I can associate my BUILD
files as Python files for highlighting, but then get red squiggles with "python_library is not defined"
(etc...) all over the place :cry:
I wonder if you could define a stub file for pants
target definitions :thinking:
I believe @cosmicexplorer has checked out BSP in the past?
That could be #7079
And +1 for implementing support for BSP.
Just putting this here for posterity. I played around with the concept for a while, and I'm using this.
It's a proof-of-concept as much as anything, but if anyone wants to run with it - be my guest! https://github.com/robotpajamas/suspenders
I actually has an idea for this to get a really solid "poor man's solution". We might wanna have a plugin (.vscode
or whatever) which export
exports the virtualenvs as well as a .vsocde
config which points to the ve
path(s) "correctly".
As a
pants
user I'd love to have a plugin on VSCode where I can have (at least):Maybe other things can be added later such as:
Note: Currently we have a plugin for IntelliJ (https://github.com/pantsbuild/intellij-pants-plugin)