fuzzy_ruby_server icon indicating copy to clipboard operation
fuzzy_ruby_server copied to clipboard

Installation question w/ neovim/coc.nvim

Open timtyrrell opened this issue 1 year ago • 5 comments

I apologize for this question but do I need to clone this repo and get the binaries in my bin PATH to use it? Did you publish the binary to a registry?

For an example of how I would configure this, it would be similar to Sublime Text LSP that ruby-lsp has in their docs. The coc.nvim docs are here but I don't mean for you to have to dig around in them.

Also, I am not super knowledgeable about rust but there is an existing crate named fuzzy that threw me off because I see your package has the same name in your cargo.toml file

timtyrrell avatar Nov 29 '23 19:11 timtyrrell

same question here, as neovim user with no knowledge of rust isn't clear to me how to get the fuzzy command available to neovim. would awesome if I could do cargo install fuzzy_ruby_server

delbetu avatar Dec 01 '23 22:12 delbetu

I think what I did was just to clone the repo and cp bin/fuzzy_<your_architecture> <somewhere_in_your_PATH>/fuzzy.

If you want to build it yourself, I'm guessing you can just run cargo build --release and then cp target/release/fuzzy <some PATH>/fuzzy

iovis avatar Dec 20 '23 17:12 iovis

Thanks @iovis this worked for me:

curl -o ~/bin/fuzzy -L https://github.com/pheen/fuzzy_ruby_server/raw/master/bin/fuzzy_darwin-arm64
chmod +x ~/bin/fuzzy

Although I would like to have an easy way to ask neovim to update all the installed lsp-servers

delbetu avatar Dec 21 '23 13:12 delbetu

One thought is you could rig up something like the following, I am still using vim-plug so my example would run anytime the plugins update:

Plug 'pheen/fuzzy_ruby_server', { 'do': 'sh ~/.config/utils/move_binary_and_chmod.sh' }

timtyrrell avatar Dec 21 '23 14:12 timtyrrell

Alright, so shoving this in my coc-settings.json seems to do the trick for me. I did the curl method mentioned above to shove it in my PATH. 👍

{
  ...
  "languageserver": {
    "fuzzyRubyServer": {
      "command": "fuzzy",
      "initializationOptions": {
        "allocationType": "ram",
        "indexGems": true,
        "reportDiagnostics": true
      },
      "filetypes": ["ruby"]
    },
  }
  ...
}

timtyrrell avatar Dec 21 '23 14:12 timtyrrell

Yup cargo build --release is the way if you need to build the binary yourself. Also see https://github.com/pheen/fuzzy_ruby_server#publishing which shows how to build for other platforms. Sorry I'm not planning on working on this project anymore for the foreseeable future.

doompling avatar Jul 04 '24 21:07 doompling