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

fix to make worksheet to display results inline #104

Closed prassee closed 1 year ago

prassee commented 1 year ago

This PR fixes the issue #103 .

ayoub-benali commented 1 year ago

@prassee thanks it looks fine by me but @rchl @rwols @predragnikolic can you please take a look ? Was there a change in LPS API that I missed ?

predragnikolic commented 1 year ago

Was there a change in LPS API that I missed ?

The code in this file was changed when we did this: https://github.com/scalameta/metals-sublime/pull/102/files#diff-cab7580409c95dd8e1ce49f2ffdf5fc769f39c478d421c727cefe18607615e9cL84-R91 I guess this feature didn't work from then... I didn't noticed this when I did the code review for that PR and the type-checker could not detect this because options were type hinted as option: Dict[str, Any].

def decoration_to_phantom(option: Dict[str, Any], view: sublime.View) -> Optional[sublime.Phantom]:
    region = range_to_region(option['range'], view)
    # ...
    point = view.text_point(option['start'].row, option['start'].col)

Well, things like can happen. @prassee thanks for the fix. :)

prassee commented 1 year ago

@ayoub-benali Can we merge this fix ?