You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.
I installed sorbet using :LspInstall sorbet, but when I run :LspInfo after opening a ruby file, it says it's not attached and "unable to find executable. Please check your path and ensure the server is installed".
I spent longer than I hoped to troubleshoot this, but eventually figured it out. There are two issues:
Sorbet's LSP does not work without having Facebook's watchman package installed.
You must initialize the project with srb init.
Issue no. 1: the gems named watchman and ruby-watchman will not suffice. Being on macOS, I was able to install it using brew install watchman. Without it, srb tc --lsp prints this message:
{"jsonrpc":"2.0","method":"window/showMessage","params":{"type":1,"message":"Error running Watchman (with `watchman -j -p --no-pretty`).\nWatchman is required for Sorbet to detect changes to files made outside of your code editor.\nDon't need Watchman? Run Sorbet with `--disable-watchman`."}}%
Issue no. 2: First you need a Gemfile in the project directory; even an empty file will suffice. Next you must run
If you skip this step, :LspInfo again incorrectly states "unable to find executable. Please check your path and ensure the server is installed". The actual problem is printed by srb:
{"jsonrpc":"2.0","method":"window/showMessage","params":{"type":1,"message":"Sorbet's language server requires a single input directory. However, 0 are configured: []"}}
Once that's done, nvim will launch and connect to sorbet.
Darwin localhost.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64
I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig
Yes
Affected language servers
sorbet
Actual behavior
The language server does not attach to the buffer when editing a Ruby file, and :LspInfo says that it is unable to find the executable.
Expected behavior
At minimum, a more useful error message should be provided, like the ones provided by srb as "window/showMessage".
Even better would be installing watchman using the OS package manager, or even just instructing the user that "watchman" is not in $PATH and it must be installed manually using the OS package manager. Because of the potential confusion with the similarly named Ruby gems (one gem is even hosted in Facebook's repository), printing some example instructions would be useful.
Secondly, provide a warning that the sorbet directory does not exist. Even better, offer to run srb init for the user, or even print the command required for them to run it themselves. Because the sorbet is installed in a separate $GEM_PATH, users might have trouble trying to run it.
Problem description
I installed sorbet using
:LspInstall sorbet
, but when I run:LspInfo
after opening a ruby file, it says it's not attached and "unable to find executable. Please check your path and ensure the server is installed".I spent longer than I hoped to troubleshoot this, but eventually figured it out. There are two issues:
watchman
package installed.srb init
.Issue no. 1: the gems named
watchman
andruby-watchman
will not suffice. Being on macOS, I was able to install it usingbrew install watchman
. Without it,srb tc --lsp
prints this message:Issue no. 2: First you need a
Gemfile
in the project directory; even an empty file will suffice. Next you must runIf you skip this step,
:LspInfo
again incorrectly states "unable to find executable. Please check your path and ensure the server is installed". The actual problem is printed bysrb
:Once that's done, nvim will launch and connect to sorbet.
Neovim version (>= 0.6)
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Operating system/version
Darwin localhost.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64
I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig
Affected language servers
sorbet
Actual behavior
The language server does not attach to the buffer when editing a Ruby file, and
:LspInfo
says that it is unable to find the executable.Expected behavior
At minimum, a more useful error message should be provided, like the ones provided by
srb
as "window/showMessage".Even better would be installing
watchman
using the OS package manager, or even just instructing the user that "watchman" is not in $PATH and it must be installed manually using the OS package manager. Because of the potential confusion with the similarly named Ruby gems (one gem is even hosted in Facebook's repository), printing some example instructions would be useful.Secondly, provide a warning that the
sorbet
directory does not exist. Even better, offer to runsrb init
for the user, or even print the command required for them to run it themselves. Because thesorbet
is installed in a separate$GEM_PATH
, users might have trouble trying to run it.LspInstallInfo output
No response
Installation log
Healthcheck
Screenshots
No response
The text was updated successfully, but these errors were encountered: