wsl2 + vscode + solargraph

config.json

{
  "solargraph.transport": "external",
  "solargraph.externalServer": {
    "host": "localhost",
    "port": 7658
  }
}

WSL2 か ら solargraphを起動する

$ bundle exec solargraph socket
Solargraph is listening PORT=7658 PID=5326
[ANY] Solargraph initialized (6.368692099999862 seconds)

Initializing Ruby language server...
Lint: executing bundle exec rubocop -s '/home/gamaspecial/rails-6.1-tools/app/helpers/encode_helper.rb' -f json...
Lint: executing bundle exec reek -f json --stdin-filename '/home/gamaspecial/rails-6.1-tools/app/helpers/encode_helper.rb'...
bundler: command not found: reek
Install missing gem executables with `bundle install`
# Gemfile
gem 'reek'

$bundle install

[2021-05-22 21:19:56.937] Starting Git Graph ...
[2021-05-22 21:19:57.130] Using git (version: 2.25.1)
[2021-05-22 21:19:57.282] > git rev-parse --show-toplevel
[2021-05-22 21:19:57.284] Showing "Git Graph" Status Bar Item
[2021-05-22 21:19:57.286] Started Git Graph - Ready to use!
[2021-05-22 21:19:57.591] Searching workspace for new repos ...
[2021-05-22 21:19:57.591] Completed searching workspace for new repos
[2021-05-22 21:19:58.267] Successfully set Visual Studio Code Context "git-graph:codiconsSupported" to "true"

つながった

おまけ
設定あれこれ

blog.freks.jp