Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate code refactorings from language-service via LSP #2050

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml").
# This file should be checked into version control along with the pnpm-lock.yaml file.
.npmrc=974837034
pnpm-lock.yaml=-1342496482
yarn.lock=-1243860663
package.json=1843460007
pnpm-lock.yaml=-1152034998
yarn.lock=-1189064062
package.json=-1838831543
pnpm-workspace.yaml=1711114604
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{
"type": "shell",
"label": "build vsix",
"command": "./scripts/build.sh"
"command": "./scripts/build.sh package.json"
}
]
}
5 changes: 2 additions & 3 deletions client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ export class AngularLanguageClient implements vscode.Disposable {
provideCodeActions: async (
document: vscode.TextDocument, range: vscode.Range, context: vscode.CodeActionContext,
token: vscode.CancellationToken, next: lsp.ProvideCodeActionsSignature) => {
if (await this.isInAngularProject(document) &&
isNotTypescriptOrInsideComponentDecorator(document, range.start) &&
isNotTypescriptOrInsideComponentDecorator(document, range.end)) {
// Code actions can trigger also outside of `@Component(<...>)` fields.
if (await this.isInAngularProject(document)) {
atscott marked this conversation as resolved.
Show resolved Hide resolved
return next(document, range, context, token);
}
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"test:legacy-syntaxes": "yarn compile:syntaxes-test && yarn build:syntaxes && jasmine dist/syntaxes/test/driver.js"
},
"dependencies": {
"@angular/language-service": "18.1.0-rc.0",
"@angular/language-service": "~18.2.0-next.1",
"typescript": "5.5.3",
"vscode-html-languageservice": "^4.2.5",
"vscode-jsonrpc": "6.0.0",
Expand Down
Loading
Loading