LoginSignup
1
1

More than 5 years have passed since last update.

eglot を clone した solargraph に接続する

Posted at

Emacs で LSP を使ってるときにちょっと Language Server 側にパッチを当てたかった。
その際、git clone した Language Server (solargraph) に eglot を繋げるのに少し躓いたので自分用メモ。

接続手順

1. solargraph の起動

以下をターミナルで実行

$ git clone git@github.com:castwide/solargraph.git
$ cd solargraph
$ bundle exec solargraph socket --port "YOUR_PORT"

これで solargraph がローカルで立ち上がる。
確認はターミナルで top コマンド等を実行すればOK。

(See: solargraph/using the solargraph executable)

2. eglot の起動

以下を Emacs で実行
univarsal-argument は、後に続くコマンドに argument を追加できるコマンド)

M-x univarsal-argument RET
M-x eglot RET

minibuffer 上で接続するプログラムを聞かれるので localhost:"YOUR_PORT" と入力
これで eglot が solargraph に接続しにいく。

(See: eglot/conncting to a server)

動作確認

Screen Shot 2019-02-02 at 18.18.59.png

Mode Line 上に eglot の文字列が現れれば接続成功!
おつかれさまでした。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1