scarpe-team / scarpe

Scarpe - shoes but running on webview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shoes-lsp, or other shoes vscode goodness

Schwad opened this issue · comments

Find ways that we can make the shoes development experience excellent for engineers in VSCode.

  • Would be nice if folks could hover on the widget/drawable and get more information ala
def on_hover(params)
  # Determine if params.position is over a Shoes method (like `para`)
  
  # ...

  # If so, return a hover object with documentation
  return LanguageServer::Protocol::Interface::Hover.new(
    contents: {
      kind: 'markdown',
      value: "### Para\n\nCreates a paragraph of text.\n\n```\npara 'Hello, world!'\n```"
    }
  )
end
  • I don't think we'll need syntax highlighting. But for folks hacking on scarpe-core it would be good to bundle in highlighting for sspec files automatically like:
"files.associations": {
  ".sspec": "ruby",
}
  • Intellisense/autocomplete for shoes could be an excellent addition as well.

Do we know how much hover/definition stuff can be done with YARD docs? We have YARD docs on some classes already, but not sure how well they work in VSCode.

@vinistock Explained to me that method hover documents with the existing RubyLSP should be enough for our hovers long-term! But that we can also explore RubyLSP addons in general too. I think there's probably a lot that can be leveraged without reinventing the wheel I reckon, compared to where I started my thinking