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

Autocomplete in angular .html does not prepend missing part of property #279

Closed
nino-magazinovic opened this issue Oct 11, 2019 · 3 comments

Comments

@nino-magazinovic
Copy link

nino-magazinovic commented Oct 11, 2019

Wild Web Developer: 0.7.0.201910102046

Autocomplete in .html works but after selecting title from popup results into {{t}} > {{ttitle}}. It does not prepend missing characters, so the test should pass referencing autocomplete on property from a object, {{person.n}} > {{person.nname}}.

Autocomplete in .ts does have two autocomplete options, one with prepending missing characters, and one with full name prepend (which is the only option in .html autocomplete).

autocomplete-ts

mickaelistria added a commit to mickaelistria/wildwebdeveloper that referenced this issue Oct 11, 2019
Signed-off-by: Mickael Istria <mistria@redhat.com>
@mickaelistria
Copy link
Contributor

I can reproduce it easily for HTML in a test case, see #280 . Debugging this test, I see the completionItem we receive is

{"jsonrpc":"2.0","id":"2","result":[{"label":"title","kind":10,"detail":"property","sortText":"title","textEdit":{"range":{"start":{"line":0,"character":7},"end":{"line":0,"character":7}},"newText":"title"}}]}

according to the spec, this is an instruction to insert title on character 7, without deleting anything. So Eclipse IDE (LSP4E) is doing the right thing, and the issue comes from the language server not passing the right range.

@mickaelistria
Copy link
Contributor

I opened angular/vscode-ng-language-service#417 for the language server.

@mickaelistria
Copy link
Contributor

This seems to be working better since 0.8.1 and recent update of Angular language server.

mickaelistria added a commit to mickaelistria/wildwebdeveloper that referenced this issue Mar 18, 2020
Signed-off-by: Mickael Istria <mistria@redhat.com>
mickaelistria added a commit to mickaelistria/wildwebdeveloper that referenced this issue Mar 18, 2020
Signed-off-by: Mickael Istria <mistria@redhat.com>
mickaelistria added a commit to mickaelistria/wildwebdeveloper that referenced this issue Mar 18, 2020
Signed-off-by: Mickael Istria <mistria@redhat.com>
mickaelistria added a commit to mickaelistria/wildwebdeveloper that referenced this issue Mar 18, 2020
Signed-off-by: Mickael Istria <mistria@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants