scalameta / metals-sublime

Sublime Text package for Metals, a language server for Scala
https://packagecontrol.io/packages/LSP-metals
Apache License 2.0
16 stars 10 forks source link

metals-sublime plugin does not show worksheet output #103

Closed prassee closed 1 year ago

prassee commented 1 year ago

the plugin lsp-metals v0.17.1 does not display worksheet results inline. However the compilation & auto-completion features works. The plugin runs in the following error each time worksheet is evaluated.

Error handling notification
Traceback (most recent call last):
  File "/data/sysconfigs/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/sessions.py", line 1987, in on_payload
    handler(result)
  File "/data/sysconfigs/sublime-text/Packages/LSP-metals/core/metals.py", line 77, in m_metals_publishDecorations
    handle_decorations(session, decorationsParams)
  File "/data/sysconfigs/sublime-text/Packages/LSP-metals/core/decorations.py", line 62, in handle_decorations
    phantom_set.update(phantoms)
  File "/data/cellar/sublime_text/Lib/python33/sublime.py", line 1897, in update
    new_phantoms = {p.to_tuple(): p for p in new_phantoms}
  File "/data/cellar/sublime_text/Lib/python33/sublime.py", line 1897, in <dictcomp>
    new_phantoms = {p.to_tuple(): p for p in new_phantoms}
  File "/data/sysconfigs/sublime-text/Packages/LSP-metals/core/decorations.py", line 107, in <lambda>
    return map(lambda o: decoration_to_phantom(o, view), options)
  File "/data/sysconfigs/sublime-text/Packages/LSP-metals/core/decorations.py", line 91, in decoration_to_phantom
    point = view.text_point(option['start'].row, option['start'].col)
KeyError: 'start'
prassee commented 1 year ago

The PR #104 is merged and v0.17.2 fixes the mentioned issue. Closing this.