0xCAFEFACE

0xCAFEFACE

Notes on a Ruby 3.0 Development Environment for VScode (linter/intellisense) on Windows 10

Subscribe to my newsletter and never miss my upcoming articles

Following the notes on how to install Ruby 3.0.0 on Windows 10 / WSL2 Ubuntu ...

If you want to have something resembling intellisense in your Ruby code in Windows 10 and VScode:

In a powershell/cmd terminal assuming you have Ruby 3.0.0 installed:

gem install nokogiri --platform=ruby

That may take a while...

Then, when that is finished:

gem install solargraph (It installs solargraph AND rubocop)


For the linter, in VScode you can open a powershell terminal in the same directory you are working in and type rubocop -A, to auto-lint everything you are currently working on.

Do that everytime you want a cleanup to your code; auto-linters currently do not work well in VScode (at least for me), and also has an extreme performance penalty, the more files you have.

In VScode, install the Solargraph extension

Restarting your terminal and/or VScode, you should have something resembling intellisense when you hit CTRL + SPACE or as you type. If you highlight, say, Array.new--it will show you info on said data structure.

#ruby#windows#vscode
 
Share this