Skip to content

Commit d459870

Browse files
JakobDegenmeta-codesync[bot]
authored andcommitted
docs: Tearing out README.fb.md and developers.fb.md
Summary: These files were an insane assortment of mostly outdated stuff that duplicated itself and other things and have probably been written more often than read. Make some new files with the relevant parts where LLMs and humans have a chance of discovering them. I've made an attempt to audit this a little bit. In some places I've just made the call to delete lots of stuff that seemed useless or harmful. Much of this is very incomplete and this could use a lot of work, but at least this way we have a structure that we might be able to usefully expand on, compared to what we had before. Reviewed By: IanChilds Differential Revision: D102637372 fbshipit-source-id: 8800115ee0914b68ddd453b020c422e6f40a9185
1 parent c83f219 commit d459870

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

vscode/README.fb.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
### Starlark VS Code Extension
2+
3+
Our team maintains a generic Starlark VS Code extension that gives IDE support
4+
for build files and .bzl files. It is under active development and will be
5+
gaining features regularly.
6+
7+
There are two copies of the VS Code Extension. One is for internal use, and is
8+
at `fbsource/vscode/vscode-extensions/starlark`, and the other, for OSS use, is
9+
at `starlark-rust/vscode`.
10+
11+
The key difference is that the internal version integrates with our internal
12+
VSCode infrastructure, and has some extra feature gating, interaction with the
13+
old buck extension, and uses our metrics framework. It also has some different
14+
setting defaults, like using `buck2` as the LSP binary instead of `starlark`
15+
16+
This plugin works by talking to `buck2 lsp` over stdin/stderr. As features are
17+
implemented in buck2's LSP server, they will automatically start working in the
18+
plugin.
19+
20+
If trying to build and install the OSS plugin on an eden FS, it can help to add
21+
a redirect to the vscode plugin's node_modules directory:
22+
23+
```shell
24+
eden redirect add fbcode/buck2/starlark-rust/vscode/node_modules bind
25+
```
26+
27+
To use the internal plugin for development, see the README in
28+
`fbsource/vscode/vscode-extensions/starlark`.
29+
30+
To use the OSS plugin for development, follow the instructions at
31+
`starlark-rust/vscode/README.md`, or the abbreviated ones here.
32+
33+
- `cd starlark-rust/vscode && npm install && npm install vsce && npm exec vsce package`
34+
- In VS Code, go to Extensions, click on the "..." button in the Extensions bar,
35+
select "Install from VSIX" and then select the `starlark-1.0.0.vsix` file at
36+
`$FBCODE/buck2/starlark-rust/vscode/starlark-1.0.0.vsix`
37+
- Update the extension settings to point to `buck2` for `starlark.lspPath`, and
38+
`["lsp"]` for `starlark.lspArguments`. This can be done in the VS Code UI by
39+
going to the extension's settings panel.
40+
41+
If you want to use a local build of buck2, just change the path to
42+
`$FBCODE/buck2/scripts/buck2_lsp.sh` and unset `starlark.lspArguments`.
43+
44+
NOTE: If you're seeing slightly confusing behavior, make sure that you're using
45+
"Starlark" as the language for files that you're editing.

0 commit comments

Comments
 (0)