sublimelsp / LSP-angular

Convenience plugin for Angular Language Service
MIT License
9 stars 2 forks source link

Chore: Bump @angular/language-server from 11.2.14 to 12.1.1 in /server #43

Closed dependabot[bot] closed 3 years ago

dependabot[bot] commented 3 years ago

Bumps @angular/language-server from 11.2.14 to 12.1.1.

Release notes

Sourced from @​angular/language-server's releases.

v12.1.1

This release upgrades @angular/language-service to v12.1.1. For a complete change log see here.

  • Deps: update to TS 4.3.4 (#1428) (fb6681ee6)

v12.1.0

This release upgrades @angular/language-service to v12.1.0. For a complete change log see here.

Features:

  1. feat: Allow renaming from string literals in TS files (#1337) (9dba839b3)

v12.0.5

This release upgrades @angular/language-service to v12.0.4.

Bug fixes:

  1. fix(completions): fix completions for inputs / outputs (#1405) (d602cf933)
  2. fix(language-service): fix autocomplete info display for attributes (angular/angular#42472)

v12.0.4

This release upgrades @angular/language-service to v12.0.3.

Bug fixes:

  1. compiler-cli: better detect classes that are indirectly exported (#42207)

v12.0.3

This release upgrades @angular/language-service to v12.0.2.

  • fix: support nullish coalesce for syntax highlighting (#1376) (fa8a98678)

v12.0.2

  • fix: only give html provider completions for inline templates (#1369) (98d5c97bb)
  • fix: avoid showing MISSING: command for code lens in templates (#1370) (fa5212faf)
  • perf: Avoid making Angular-related decisions for files not in an Angular project (#1360) (f83b02eb0)
  • fix: remove angular.ngdk configuration (#1361) (797140c2b)
  • fix: remove message about disabled LS if ngcc fails (#1359) (0fdc5fb20)

v12.0.1

This release fixes a bug where View Engine is not launched for older projects even though the Angular version is resolved correctly. This is because the configuration value is typed as boolean, and defaults to false even when the value is not set. (d6cb5cb5ad)

v12.0.0

This release upgrades @angular/language-service to v12.0.0. For a complete change log see here.

Ivy-native language service is now the default in v12! If your project uses Angular v9 and above, the extension will automatically switch to Ivy. Older projects will keep using View Engine language service.

... (truncated)

Changelog

Sourced from @​angular/language-server's changelog.

v12.1.1

This release upgrades @angular/language-service to v12.1.1. For a complete change log see here.

  • update to TS 4.3.4 (#1428) (fb6681ee6)

v12.1.0

This release upgrades @angular/language-service to v12.1.0. For a complete change log see here.

Features:

  1. feat: Allow renaming from string literals in TS files (#1337) (9dba839b3)

v12.0.5

Bug fixes:

  1. fix(completions): fix completions for inputs / outputs (#1405) (d602cf933)
  2. fix(language-service): fix autocomplete info display for attributes (angular/angular#42472)

v12.0.4

This release upgrades @angular/language-service to v12.0.3.

Bug fixes:

  1. compiler-cli: better detect classes that are indirectly exported (#42207)

v12.0.3

This release upgrades @angular/language-service to v12.0.2.

  • fix: support nullish coalesce for syntax highlighting (#1376) (fa8a98678)

v12.0.2

  • fix: only give html provider completions for inline templates (#1369) (98d5c97bb)
  • fix: avoid showing MISSING: command for code lens in templates (#1370) (fa5212faf)
  • perf: Avoid making Angular-related decisions for files not in an Angular project (#1360) (f83b02eb0)
  • fix: remove angular.ngdk configuration (#1361) (797140c2b)
  • fix: remove message about disabled LS if ngcc fails (#1359) (0fdc5fb20)

v12.0.1

This release fixes a bug where View Engine is not launched for older projects even though the Angular version is resolved correctly. This is because the configuration value is typed as boolean, and defaults to false even when the value is not set. (d6cb5cb5ad)

... (truncated)

Commits
  • 07581a3 release: v12.1.1
  • 547242b build(deps): bump glob-parent in /integration/project (#1406)
  • 8b6fe62 chore(deps): update dependency vsce to v1.95.0 (#1422)
  • 4e34fb0 fix(deps): update angular monorepo to v12.1.0 (#1416)
  • e10358c chore(deps): update dependency prettier to v2.3.2 (#1423)
  • 55a88c1 chore(deps): update dependency @​types/node to v14.17.4 (#1393)
  • fb6681e build: update to TS 4.3.4 (#1428)
  • 53ad8bb release: v12.1.0
  • 66fbc95 build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#1411)
  • ac8f58f chore(deps): update dependency @​types/jasmine to v3.7.7 (#1402)
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
predragnikolic commented 3 years ago

Upgrading the server to 12.1.1. causes issues with completions. So I would not merge this.

when I type the completion and select it, nothing gets completed:

output

rchl commented 3 years ago

Would you be able to check the relevant server messages?

I've seen issues like that before which were related to using $ character in the completion, I believe.

rwols commented 3 years ago

Specifically https://github.com/sublimelsp/LSP/issues/1088

predragnikolic commented 3 years ago

Here is the error I got:

Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 1488, in run_
    return self.run(edit, **args)
  File "/home/predragnikolic/.config/sublime-text/Packages/LSP/plugin/completion.py", line 74, in run
    edit_region = range_to_region(Range.from_lsp(text_edit['range']), self.view)
KeyError: 'range'

And I found the cause.

Here is a quick comparison in completion items between the current master and this PR:

The completion item for title for current master looks like this:

{'label': 'title', 'textEdit': {'range': {'start': {'line': 345, 'character': 13}, 'end': {'line': 345, 'character': 15}}, 'newText': 'title'}, 'detail': 'property', 'data': {'position': {'line': 345, 'character': 15}, 'kind': 'ngCompletionOriginData', 'filePath': '/home/predragnikolic/Documents/sandbox/ang-app/src/app/app.component.html'}, 'kind': 10, 'sortText': 'title'}

Take a look at the textEdit, it is of type TextEdit in the spec.

Now lets look at the completion item received in this PR:

{'label': 'title', 'data': {'filePath': '/home/predragnikolic/Documents/sandbox/ang-app/src/app/app.component.html', 'kind': 'ngCompletionOriginData', 'position': {'character': 15, 'line': 345}}, 'detail': 'property', 'kind': 10, 'sortText': '1', 'textEdit': {'replace': {'end': {'character': 15, 'line': 345}, 'start': {'character': 13, 'line': 345}}, 'newText': 'title', 'insert': {'end': {'character': 15, 'line': 345}, 'start': {'character': 13, 'line': 345}}}}

Take a look at the textEdit, it is of type InsertReplaceEdit in the spec.

Technically I would call this a bug at the angular repo for not following the spec:

Most editors support two different operations when accepting a completion item. One is to insert a completion text and the other is to replace an existing text with a completion text. Since this can usually not be predetermined by a server it can report both ranges. Clients need to signal support for InsertReplaceEdits via the textDocument.completion.completionItem.insertReplaceSupport client capability property.

The ST LSP plguin is not announceing that is supports insertReplaceSupport, so the angular LS should not assume that the client does support it.

But at least I know on what I am going to work on next :)

predragnikolic commented 3 years ago

Even when we implement insertReplaceSupport in LSP for ST4. Option 1 I have to ask if we are going to at least create a tag for LSP-angular with the current master(because apparently this is the last version that will work on ST3)

There is a different approach.

Option 2 There can be an issue created at the angular ls repo. Angular ls is not actually checking the client capability insertReplaceSupport and it doesn't fall back gracefully if it doesn't support that capability to something like a TextEdit.

The second options for me makes more sense? What do you guys think?

rwols commented 3 years ago

Angular should respect the client capability :)

dependabot[bot] commented 3 years ago

Superseded by #45.

predragnikolic commented 3 years ago

I created an issue at the angular repo.