appdev-projects / rails-7-template

6 stars 41 forks source link

Add ruby lsp #28

Open heratyian opened 2 months ago

heratyian commented 2 months ago

Any thoughts on including the Shopify ruby-lsp by default?

It helps with showing documentation and command click to go to files.

https://marketplace.visualstudio.com/items?itemName=Shopify.ruby-lsp

bpurinton commented 1 month ago

While working on https://github.com/appdev-projects/rails-7-template/pull/34, I had a lot of trouble trying to get ruby-lsp installed and working in codespaces.

I finally tracked down the issue I'm having exactly as described here: https://github.com/Shopify/ruby-lsp/issues/1714, i.e. here's my output from trying to manually start the ruby-lsp server:

rails-7-template bp-audit-extensions-and-settings % ruby-lsp
/home/student/.rvm/ruby-3.2.1/bin/ruby-lsp: 6: exec: /home/student/.rvm/ruby-3.2.1/bin/ruby: not found

Rather than actually resolving anything on that issue, after some painful looking debugging attempts, it looks like they just did a clean install and solved some unknown configuration problem without fixing the original bug 😑. I fear this might be rabbit hole so I'm going to keep this addition in the backlog unless it's something vital.

It helps with showing documentation and command click to go to files.

Maybe I misunderstand, but doesn't command clicking already open a file? (I just tested e.g. ls then command clicking at the terminal).