VS Code for Ruby on Rails development

Here I explain extensions and settings I use with VS Code as a hard core ruby on rails developer.

VS Code for Ruby on Rails development

I work in ruby on rails and I use VS Code daily. I am sharing extensions I use with VS Code with the settings as well.

Extensions:

1. Dash:

I use Dash alot for documentation search. So, this extension helps to search documentation much easily using selecting the code to search and pressing ctrl + h. Extension link is here.

2. Docker:

I use Docker with docker compose for my development. VS Code has very good extensions for handling docker from VS Code and also help in docker files code highlights. The extensions for docker are below:

3. endwise:

This is an extension that wisely adds the "end" keyword to code structures in Ruby while keeping the correct indentation levels. Extension link is here.

4. GitLens - Git supercharged:

It helps you to visualize code authorship at a glance via Git blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via powerful comparison commands, and so much more. Extension link is here.

5. indent-rainbow:

This extension colorizes the indentation in front of your text alternating four different colors on each step. Extension link is here.

6. jbuilder highlight:

I use jbuilder as json builder for Ruby on Rails API. This extension highlights the code in .jbuilder files. Extension link is here.

7. Material Icon Theme:

This extension adds beautiful icons to different file extensions. Extension link is here.

8. Rails:

This is the main extension of VS Code for Ruby on Rails developers. Extension link is here. This extension provides code highlights, snippets and many commands. This extension also install two other extensions:

9. Railscasts Renewed:

This is a great syntax theme using colours from the railscasts palette. Extension link here.

10. Ruby:

This is also one of the main extensions for Ruby on Rails developers. Extension link is here.

11. Ruby on Rails:

This extension adds snippets, and auto-complete to rails code. Extension link is here.

12. Ruby Solargraph:

Solargraph is a language server that provides intellisense, code completion, and inline documentation for Ruby. Also install solargrah gem to your ruby environment as well so that this extension can work. Extension link is here.

13. Ruby Test Explorer:

The extension supports the RSpec and Minitest test frameworks. Extension link is here.

14. Test Explorer UI:

This extension provides an extensible user interface for running your tests in VS Code. Extension link is here.

15. Tabnine Autocomplete AI: JavaScript, Python, TypeScript, PHP, Go, Java, Ruby, C/C++, HTML/CSS, C#, Rust, SQL, Bash, Kotlin, React

Tabnine is a powerful Artificial Intelligence assistant designed to help you code faster, reduce mistakes, and discover best coding practices - without ever leaving the comfort of VSCode. Extension link is here.

16. Thunder Client:

Thunder Client is a lightweight Rest API Client Extension for Visual Studio Code. Great alternative for Postman. Extension link is here.


VS Code Settings:

The settings.json given below for VS Code:

{
    "workbench.colorTheme": "Railscasts Renewed",
    "workbench.iconTheme": "material-icon-theme",
    "editor.tabSize": 2,
    "editor.fontFamily": "'Fira Code', Menlo, Monaco, 'Courier New', monospace",
    "editor.fontLigatures": true,
    "terminal.integrated.fontFamily": "'MesloLGS NF'",
    "ruby.useLanguageServer": true,
    "ruby.lint": {
        "ruby": true
    },
    "explorer.confirmDelete": false,
    "editor.minimap.enabled": false,
    "git.autofetch": true,
    "editor.formatOnSave": true,
    "editor.cursorBlinking": "smooth",
    "editor.cursorSmoothCaretAnimation": true,
    "workbench.fontAliasing": "antialiased",
    "workbench.editor.closeOnFileDelete": true,
    "terminal.external.osxExec": "iTerm.app",
    "terminal.integrated.cursorStyle": "line",
    "ruby.codeCompletion": "rcodetools",
    "ruby.intellisense": "rubyLocate",
    "ruby.useBundler": true,
    "solargraph.autoformat": true,
    "workbench.activityBar.visible": true,
    "editor.fontSize": 14,
    "tabnine.experimentalAutoImports": true,
    "window.zoomLevel": 0
}

I use Fira Code with font-ligatures for the editor. MesloLGS NF font for the terminal. Also I changed the cursor style and many more.