Skip to content

Commit d3152bb

Browse files
authored
Add page for LSP troubleshooting (#5554)
## Description Adds a doc page for troubleshooting LSP. If users report an issue with LSP, we can direct them here to save time. ## Checklist - [ ] I have linked to any relevant issues. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [ ] I have requested a review from the relevant team or maintainers.
1 parent f912881 commit d3152bb

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

docs/book/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
- [Sway LSP](./lsp/index.md)
5555
- [Installation](./lsp/installation.md)
5656
- [Features](./lsp/features.md)
57+
- [Troubleshooting](./lsp/troubleshooting.md)
5758
- [Sway Reference](./reference/index.md)
5859
- [Compiler Intrinsics](./reference/compiler_intrinsics.md)
5960
- [Attributes](./reference/attributes.md)

docs/book/src/lsp/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ Whether you are a beginner or an experienced Sway developer, this documentation
1212

1313
- [Installation](./installation.md)
1414
- [Features](./features.md)
15+
- [Troubleshooting](./troubleshooting.md)

docs/book/src/lsp/troubleshooting.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Troubleshooting
2+
3+
First, confirm you are running the most recent version:
4+
5+
```sh
6+
fuelup toolchain install latest
7+
fuelup update
8+
forc-lsp --version
9+
```
10+
11+
Second, confirm that your `$PATH` resolves to the `forc-lsp` binary in `$HOME/.fuelup/bin`.
12+
13+
```sh
14+
which forc-lsp
15+
```
16+
17+
## Server Logs
18+
19+
You can you enable verbose logging of the LSP server.
20+
21+
In VSCode, this is under the setting:
22+
23+
```json
24+
"sway-lsp.trace.server": "verbose"
25+
```
26+
27+
Once enabled, you can find this in the output window under Sway Language Server.
28+
29+
For other editors, see [Installation](./installation.md) for links to documentation.

0 commit comments

Comments
 (0)