https://pantsbuild.org/ logo
#general
Title
# general
h

high-yak-85899

03/30/2022, 12:16 AM
Moving to a separate thread but related to the above: I realized that because I set a file association in vscode to map my BUILD.pants files to the Starlark language, vscode was using
buildifier
as the default formatter.
buildifier
is very rigid so I can't customize it to be like
yapf
. I also can't associate BUILD.pants files with the Python language because vscode will start complaining about a bunch of errors with the language server running on it. Any recommendations from people who may have experienced similar?
I'd really like to get
formatOnSave
working. While
./pants update-build-files
is fast, anything I don't have to run is better than something I do have to run 🙂
h

hundreds-father-404

03/30/2022, 12:17 AM
In PyCharm, I associated BUILD files with .txt files 🤷 very imperfect I wonder if w/ VSCode you can permanently disable unrecognized symbols for certain symbols?
h

high-yak-85899

03/30/2022, 12:18 AM
I'm close. I was able to add
BUILD.pants
as an ignore pattern for the python extension and it got rid of all but the language server errors while still allowing me to format on save.
👍 1
4 Views