-
Notifications
You must be signed in to change notification settings - Fork 123
feat: provide snippets for attribute #1509
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: provide snippets for attribute #1509
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, I just tried this out and the completion experience is really nice. Thanks for all your hard work!
96878de
to
a0be535
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only add two tests. I think no need to copy all the tests from @angular/language-service
tsconfig.json
Outdated
@@ -4,7 +4,8 @@ | |||
"module": "commonjs", | |||
"moduleResolution": "node", | |||
"sourceMap": true, | |||
"strict": true | |||
"strict": true, | |||
"esModuleInterop": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consistent with the angular repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Yea, I was having an issue with this yesterday as well. I'll create a separate PR to make this change.
tsconfig.json
Outdated
@@ -4,7 +4,8 @@ | |||
"module": "commonjs", | |||
"moduleResolution": "node", | |||
"sourceMap": true, | |||
"strict": true | |||
"strict": true, | |||
"esModuleInterop": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Yea, I was having an issue with this yesterday as well. I'll create a separate PR to make this change.
package.json
Outdated
"angular.suggest.includeCompletionsWithSnippetText": { | ||
"type": "boolean", | ||
"default": true, | ||
"description": "Enable/disable snippet completions from angular language Server. Requires using TypeScript 4.3+ in the workspace." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the part about requiring TS 4.3+ accurate? Wouldn't the feature simply require the client to have snippetSupport
in the capabilities? Or have I forgotten something on the @angular/language-service
side of things that requires TS 4.3?
This feature does require that the "legacy View Engine" option is not enabled though (same with includeAutomaticOptionalChainCompletions
, but I missed that in the last review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TSServer support the includeCompletionsWithSnippetText
since 4.3+.
And the user can override the version of ts(Maybe we should remove it like angular.ngdk
).
I think I can remove this part and control the version by MIN_TS_VERSION
.
vscode-ng-language-service/server/src/version_provider.ts
Lines 14 to 15 in f18b5ac
const MIN_TS_VERSION = '4.2'; | |
const MIN_NG_VERSION = '12.0'; |
(I think the
MIN_NG_VERSION
is useless after all the @angular/language-service
is always bundled with the extension).
@ivanwonder The build/test issues have been resolved. If you rebase your PR, we can now get this reviewed and merged. |
7539c2e
to
97da874
Compare
90cd843
to
345b46e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the one question about
includeCompletionsWithInsertText: this.includeAutomaticOptionalChainCompletions || includeCompletionsWithSnippetText,
BTW, Should we specify the version of |
Yes, we should probably match what is done in the |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.