Skip to content

Commit 2f49805

Browse files
authored
docs(amazonq): update docs for connecting local language-server-runtimes (#7934)
## Problem - `npm link` is not working for some people when connecting local language-server-runtimes ## Solution - `npm pack` has been working better for people, hence updating documentation to include the `npm pack` approach --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 4dfb659 commit 2f49805

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

docs/lsp.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,26 +77,60 @@ If you want to connect a local version of language-server-runtimes to aws-toolki
7777
/toolkit
7878
/core
7979
/amazonq
80+
/language-servers
8081
/language-server-runtimes
8182
```
8283
8384
2. Inside of the language-server-runtimes project run:
85+
8486
```
8587
npm install
8688
npm run compile
8789
cd runtimes
8890
npm run prepub
8991
cd out
92+
```
93+
94+
If you get an error running `npm run prepub`, you can instead run `npm run prepub:copyFiles` to skip cleaning and testing.
95+
96+
3. Choose one of the following approaches:
97+
98+
### Option A: Using npm pack (Recommended)
99+
100+
3a. Create a package file:
101+
102+
npm pack
103+
104+
You will see a file created like this: `aws-language-server-runtimes-0.*.*.tgz`
105+
106+
4a. Inside of language-servers, find the package where you need the change.
107+
108+
For example, if you would like the change in `language-servers/app/aws-lsp-codewhisperer-runtimes`, you would run:
109+
110+
cd language-servers/app/aws-lsp-codewhisperer-runtimes
111+
112+
npm install ../../../language-server-runtimes/runtimes/out/aws-language-server-runtimes-0.*.*.tgz
113+
114+
npm run compile
115+
116+
5a. If you need the change in aws-toolkit-vscode run:
117+
118+
cd aws-toolkit-vscode
119+
120+
npm install ../language-server-runtimes/runtimes/out/aws-language-server-runtimes-0.*.*.tgz
121+
122+
### Option B: Using npm link (Alternative)
123+
124+
3b. Create npm links:
125+
90126
npm link
91127
cd ../../types
92128
npm link
93-
```
94-
If you get an error running `npm run prepub`, you can instead run `npm run prepub:copyFiles` to skip cleaning and testing.
95-
3. Inside of aws-toolkit-vscode run:
96-
```
129+
130+
4b. Inside of aws-toolkit-vscode run:
131+
97132
npm install
98133
npm link @aws/language-server-runtimes @aws/language-server-runtimes-types
99-
```
100134
101135
## Amazon Q Inline Activation
102136

0 commit comments

Comments
 (0)