stimulus-lsp icon indicating copy to clipboard operation
stimulus-lsp copied to clipboard

No LSP suggestions in Rails functions (data: {action: ""})

Open Gert-JanPeeters opened this issue 2 years ago • 1 comments

Hi,

For example:

<%= link_to root_path, data: {action: "click->hello#hello"} %>

This is not getting picked up by the LSP. It is a common pattern in Rails so definitely worth adding this support, I would think?

Gert-JanPeeters avatar Nov 13 '23 16:11 Gert-JanPeeters

Hey @Gert-JanPeeters, thanks for reporting this! Yes, I definitely want to support this as well, but it requires some more work.

One of the first steps was to implement the JavaScript visitors for Prism (https://github.com/ruby/prism/pull/1769) so we can parse the Ruby code from Node.

Next up is to integrate this into the Stimulus LSP so we can prose and look for ERB in HTML files.

marcoroth avatar Nov 16 '23 19:11 marcoroth