🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

lsp_router

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lsp_router

0.1.3
Rubygems
Version published
Maintainers
1
Created
Source

LspRouter

複数のLSPサーバーに処理を振り分けるルーター

Installation

gem install lsp_router

Usage

次のような config ファイルを作成して、lsp_router config-file のように実行する。

logfile '/tmp/lsp_router'
loglevel :info

server :rubocop do
  command 'rubocop --lsp'
  mode :stdio
end

server :solargraph do
  command 'solargraph stdio'
  mode :stdio
end

この例では、rubocop --lspsolargraph stdio を起動して、クライアントからの処理を振り分ける。 最初に各サーバーの capabilities を確認して、各サーバーにどの機能があるかを確認し、クライアントからの REQUEST は対応しているサーバーに渡す。複数のサーバーが同じ機能を持っていれば上に書いたサーバーが優先される。NOTIFICATION は全サーバーに渡す。

Example

Emacs の Eglot の場合はこんな感じに設定するといいっぽい。

(add-to-list 'eglot-server-programs '((ruby-mode ruby-ts-mode) . ("lsp_router" "--error=lsp_router.err" "lsp_router.conf")))

License

GPLv3

FAQs

Package last updated on 23 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts