-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move all workspace retrieval to the language server (#1402)
- Loading branch information
Showing
69 changed files
with
378 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
apps/vscode-e2e/specs/language-server/language-server.e2e.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { openWorkspace } from '../utils'; | ||
|
||
describe('Nx Console should have the language server running', () => { | ||
before(async () => { | ||
await openWorkspace('nx'); | ||
}); | ||
|
||
it('should start the ls', async () => { | ||
const workbench = await browser.getWorkbench(); | ||
const bottomBar = await workbench.getBottomBar(); | ||
await bottomBar.maximize(); | ||
const outputView = await bottomBar.openOutputView(); | ||
await outputView.wait(); | ||
await outputView.selectChannel('Nx Console Client'); | ||
const output = await outputView.getText(); | ||
console.log(output); | ||
expect( | ||
output.some((element) => | ||
element.toLowerCase().includes('createProjectGraphAsync'.toLowerCase()) | ||
) | ||
).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,5 +99,5 @@ | |
"outputs": ["coverage/apps/vscode-ui"] | ||
} | ||
}, | ||
"tags": [] | ||
"tags": ["type:vscode-ui"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,5 +140,5 @@ | |
"outputs": ["dist/apps/vscode"] | ||
} | ||
}, | ||
"tags": [] | ||
"tags": ["type:vscode"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 5 additions & 7 deletions
12
libs/language-server/capabilities/code-completion/src/lib/get-completion-items.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
libs/language-server/capabilities/code-completion/src/lib/input-name-completion.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
libs/language-server/capabilities/code-completion/src/lib/project-completion.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
libs/language-server/capabilities/code-completion/src/lib/project-target-completion.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
libs/language-server/capabilities/code-completion/src/lib/tags-completion.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
libs/language-server/capabilities/code-completion/src/lib/targets-completion.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import { RequestType, NotificationType } from 'vscode-languageserver/node'; | ||
import type { NxWorkspaceConfiguration } from '@nx-console/shared/workspace'; | ||
import { NotificationType, RequestType } from 'vscode-languageserver/node'; | ||
import { NxWorkspace } from '@nx-console/shared/types'; | ||
|
||
export const NxChangeWorkspace: NotificationType<string> = new NotificationType( | ||
'nx/changeWorkspace' | ||
); | ||
|
||
export const NxWorkspaceRefreshNotification: NotificationType<void> = | ||
new NotificationType('nx/refreshWorkspace'); | ||
|
||
export const NxWorkspaceRequest: RequestType< | ||
void, | ||
NxWorkspaceConfiguration, | ||
{ reset: boolean }, | ||
NxWorkspace, | ||
unknown | ||
> = new RequestType('nx/workspace'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# language-server-workspace | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
## Running unit tests | ||
|
||
Run `nx test language-server-workspace` to execute the unit tests via [Jest](https://jestjs.io). | ||
|
||
## Running lint | ||
|
||
Run `nx lint language-server-workspace` to execute the lint via [ESLint](https://eslint.org/). |
Oops, something went wrong.