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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

No intellisense for events and structural directives starting with v12 #1388

Closed
1 of 2 tasks
ww2406 opened this issue May 31, 2021 · 8 comments 路 Fixed by #1405
Closed
1 of 2 tasks

No intellisense for events and structural directives starting with v12 #1388

ww2406 opened this issue May 31, 2021 · 8 comments 路 Fixed by #1405
Assignees
Labels

Comments

@ww2406
Copy link

ww2406 commented May 31, 2021

馃悶 bug report

Is this a regression?

Yes, the previous version in which this bug was not present was: 11.2.14

Description

Since the version 12 release, intellisense no longer appears for events and directives.

Bug Type

  • Angular Language Service VSCode extension
  • Angular Language Service server

Reproduction

Typing () and pressing ctrl-space yields "no suggestions". Similarly, nothing populates anymore for common directives, e.g. *ngIf.

Steps to reproduce the behavior:

In a template, start typing () or *ng. Press ctrl-space. You'll get "no suggestions" instead of a list of events (e.g., (click) ) or *ngIf.

Expected behavior

A list of possible values should be provided.

Logs

I've pulled out a few lines of interest. Nothing else appeared out of the ordinary. If there is another area in particular you need to see, let me know and I can pull it out.


Open files: 
	FileName: /Users/jdoe/Projects/Angular/project/src/app/home/home.component.html ProjectRootPath: undefined
		Projects: /dev/null/inferredProject1*
Err 242   [23:24:26.111] No config file for /Users/jdoe/Projects/Angular/project/src/app/home/home.component.html
Info 243  [23:24:26.524] Starting updateGraphWorker: Project: /dev/null/inferredProject1*
Info 244  [23:24:26.533] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 5 structureChanged: false Elapsed: 8.963292121887207ms
Info 245  [23:24:26.533] Different program with same set of files:: structureIsReused:: 2

馃實 Your Environment

Angular Version:


11.2.5

However, I have experienced this in other Angular 10 and 12 projects.

Extension Version:


12.0.3

However, I tested every version in 12.x and all had the same issue. Last working version is 11.2.4.

VSCode Version:


1.56.2

Operating System:


OS X 11.2.3 and Windows 10 (unsure build)
@ww2406 ww2406 added the bug label May 31, 2021
@rekna1

This comment has been minimized.

@atscott

This comment has been minimized.

@atscott

This comment has been minimized.

@rekna1

This comment has been minimized.

@atscott

This comment has been minimized.

@atscott atscott changed the title No intellisense for events and directives starting with v12 No intellisense for events and structural directives starting with v12 Jun 3, 2021
@atscott atscott self-assigned this Jun 3, 2021
@atscott
Copy link
Collaborator

atscott commented Jun 3, 2021

Investigated this some more today and can confirm that this is indeed an issue in all projects with no need for any special configuration to reproduce.

@lincolnthree

This comment has been minimized.

atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Jun 8, 2021
The `TextEdit` is not meant to replace text to the right of the
position. Instead, `InsesrtReplaceEdit` should be used.

Reference discussion in LSP issue for examples on replacement vs
insertion range for `InsertReplaceEdit`:
microsoft/language-server-protocol#846

Fixes angular#1388

Note that the issue did not appear in the VE version of the extension
because it was only providing completions as inserts (they had
no `replacementSpan`).
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Jun 8, 2021
The `TextEdit` is not meant to replace text to the right of the
position. Instead, `InsesrtReplaceEdit` should be used.

Reference discussion in LSP issue for examples on replacement vs
insertion range for `InsertReplaceEdit`:
microsoft/language-server-protocol#846

Fixes angular#1388

Note that the issue did not appear in the VE version of the extension
because it was only providing completions as inserts (they had
no `replacementSpan`).
atscott added a commit that referenced this issue Jun 8, 2021
* fix: add directive and event to completion kind type

* fix(completions): fix completions for inputs / outputs

The `TextEdit` is not meant to replace text to the right of the
position. Instead, `InsesrtReplaceEdit` should be used.

Reference discussion in LSP issue for examples on replacement vs
insertion range for `InsertReplaceEdit`:
microsoft/language-server-protocol#846

Fixes #1388

Note that the issue did not appear in the VE version of the extension
because it was only providing completions as inserts (they had
no `replacementSpan`).
atscott added a commit that referenced this issue Jun 8, 2021
* fix: add directive and event to completion kind type

* fix(completions): fix completions for inputs / outputs

The `TextEdit` is not meant to replace text to the right of the
position. Instead, `InsesrtReplaceEdit` should be used.

Reference discussion in LSP issue for examples on replacement vs
insertion range for `InsertReplaceEdit`:
microsoft/language-server-protocol#846

Fixes #1388

Note that the issue did not appear in the VE version of the extension
because it was only providing completions as inserts (they had
no `replacementSpan`).

(cherry picked from commit c4310e2)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants