scarpe-team / scarpe

Scarpe - shoes but running on webview
Other
162 stars 30 forks source link

Shoes-lsp, or other shoes vscode goodness #479

Open Schwad opened 7 months ago

Schwad commented 7 months ago

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

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
"files.associations": {
  ".sspec": "ruby",
}
noahgibbs commented 7 months ago

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.

Schwad commented 7 months ago

@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