-
Notifications
You must be signed in to change notification settings - Fork 122
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 and method completions #820
Conversation
when the user selects the attribute in the completion list, the position of the cursor is not expected. It should be in the middle of quotes.
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.
Thanks for the fix, this has been requested for some time. However, I think it would be better to provide this in the language service package so that other Angular language servers, like CoC can take advantage of it too. It is easier to test in the upstream package as well. WDYT?
re #521 |
Yes, I think it's possible to move the code to the upstream package. Because this PR only does is rewrite the
Maybe I need to look into it. |
More to your point this feature relies on snippet, which is available in the LSP protocol but not available in the Typescript interface. I think it's a good feature to have, but we should discuss if we want to have such complex logic in the extension layer. I've briefly read about "Actions", but do not understand enough to know how they are used. Perhaps we could explore it a little more and see if it could be used here. |
My two cents: I don't think @angular/language-service needs to in total alignment with the tsserver API. We aren't currently. In my opinion the language service package should provide the best features it can, and then it should be the responsibility of the extension implementations to convert the features provided by the language service into types expected by the LSP implementation the extension is targeting. Of course the two pieces shouldn't diverge very far, but keeping the features of the core language service in one component makes it easier to develop new features without having to wait for users to catch up. |
I think it's better to let the
I found that the vscode will filter the completion items by the text cut by |
I find the issue about snippet for TSServer |
Closing, since we're implementing this in the @angular/language-service and then adding an option for handling it in the @angular/language-server |
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. |
when the user selects the attribute in the completion list, the position of the cursor is not expected. It should be in the middle of quotes.