Shopify / ruby-lsp

An opinionated language server for Ruby
https://shopify.github.io/ruby-lsp/
MIT License
1.35k stars 121 forks source link

Handle manually invoked completion #2055

Open vinistock opened 2 weeks ago

vinistock commented 2 weeks ago

The LSP spec allows users to invoke completion manually without typing anything.

This scenario is very different from what we currently handle because there's no target node. We simply need to show all possible completion items for the current receiver.

We will need to think about how addons can be invoked for this case and how they should enhance the base response. We may need to allow for a nil target intentionally and then define a special event for it.

andyw8 commented 2 weeks ago

Can that be triggered in VS Code?

vinistock commented 2 weeks ago

It should be possible, although I'm not sure what's the right hotkey.

andyw8 commented 2 weeks ago

Ah, Ctrl-Space.