Skip to content

Commit 168806e

Browse files
authored
fix(amazonq): enable local workspace server through flare (#7089)
## Problem local workspace context has been added to flare and its needed for falcon changes ## Solution we don't have `aws.q` settings in vscode so we have to use the language server middleware to send back the settings Once local workspace context is fully working and in the manifest I'll uncomment --- - 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 0bbefa4 commit 168806e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/amazonq/src/lsp/client.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,23 @@ export async function startLanguageServer(
7272
const clientOptions: LanguageClientOptions = {
7373
// Register the server for json documents
7474
documentSelector,
75+
middleware: {
76+
workspace: {
77+
configuration: async (params, token, next) => {
78+
const config = await next(params, token)
79+
if (params.items[0].section === 'aws.q') {
80+
return [
81+
{
82+
projectContext: {
83+
enableLocalIndexing: true,
84+
},
85+
},
86+
]
87+
}
88+
return config
89+
},
90+
},
91+
},
7592
initializationOptions: {
7693
aws: {
7794
clientInfo: {

0 commit comments

Comments
 (0)