williamboman / mason-lspconfig.nvim

Extension to mason.nvim that makes it easier to use lspconfig with mason.nvim.
Apache License 2.0
2.83k stars 174 forks source link

elixirls #57

Closed ignamartinoli closed 2 years ago

ignamartinoli commented 2 years ago

Problem description

As stated in the nvim-lspconfig documentation, elixirls doesn't have set a default cmd field, since nvim-lspconfig doesn't make assumptions about the path.

If somebody installs elixirls through mason.nvim though, the path is definitely $XDG_DATA_HOME/nvim/mason/bin/elixir-ls.

This option could be added to the plugin.

Why do you think this is an issue with mason-lspconfig.nvim?

elixirls installed via mason.nvim has a predefined path that can be already set to have out-of-the-box compatibility with nvim-lspconfig.

Neovim version (>= 0.7)

NVIM v0.7.2 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3

Operating system/version

Linux sicro 5.19.8-gentoo #1 SMP Fri Sep 9 00:17:13 -03 2022 x86_64 AMD Ryzen 7 PRO 4750U with Radeon Graphics AuthenticAMD GNU/Linux

I've manually reviewed the Nvim LPS client log (:LspLog) to find potential errors

I've recently downloaded the latest plugin version of mason.nvim, mason-lspconfig.nvim, and nvim-lspconfig

Affected language servers

elixirls

Steps to reproduce

  1. :MasonInstall elixirls

Actual behavior

elixirls doesn't start

Expected behavior

elixirls starting

LspInfo

Language client log: /home/sicro/.cache/nvim/lsp.log
 Detected filetype:   elixir

 1 client(s) attached to this buffer: 

 Client: elixirls (id: 1, pid: 1295, bufnr: [1])
    filetypes:       elixir, eelixir, heex
    autostart:       true
    root directory:  /home/sicro
    cmd:             /home/sicro/.local/share/nvim/mason/bin/elixir-ls

 Configured servers list: elixirls, fsautocomplete, csharp_ls, jsonls, cssls, gopls, bashls, clangd, jdtls, sqls, remark_ls, tsserver, sumneko_lua, html, awk_ls, hls, vuels, kotlin_language_server, lemminx, texlab, clojure_lsp, julials, dockerls, metals, pyright, taplo, rust_analyzer, erlangls, elmls, racket_langserver

LspLog

No response

Healthcheck

mason: require("mason.health").check()
========================================================================
## mason.nvim report
  - OK: neovim version >= 0.7.0
  - OK: **Go**: `go version go1.19.1 linux/amd64`
  - OK: **cargo**: `cargo 1.62.1`
  - OK: **luarocks**: `/usr/bin/luarocks 3.9.1`
  - OK: **Ruby**: `ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [x86_64-linux]`
  - OK: **RubyGem**: `3.3.8`
  - WARNING: **Composer**: not available
  - WARNING: **PHP**: not available
  - OK: **npm**: `8.17.0`
  - OK: **node**: `v18.7.0`
  - OK: **python3**: `Python 3.10.7`
  - OK: **pip3**: `pip 22.2.2 from /usr/lib/python3.10/site-packages/pip (python 3.10)`
  - OK: **javac**: `javac 17.0.3`
  - OK: **java**: `openjdk version "17.0.3" 2022-04-19`
  - OK: **julia**: `julia version 1.7.3`
  - OK: **wget**: `GNU Wget 1.21.3 built on linux-gnu.`
  - OK: **curl**: `curl 7.85.0 (x86_64-pc-linux-gnu) libcurl/7.85.0 OpenSSL/1.1.1q zlib/1.2.12 libssh2/1.10.0 nghttp2/1.48.0`
  - OK: **gzip**: `gzip 1.12`
  - OK: **tar**: `tar (GNU tar) 1.34`
  - OK: **bash**: `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
  - OK: **sh**: `Ok`
  - OK: **JAVA_HOME**: `openjdk version "17.0.3" 2022-04-19`
  - OK: GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Tue 13 Sep 2022 07:53:23 PM -03.

Screenshots or recordings

The fix to this is adding the path to elixirls to cmd

williamboman commented 2 years ago

If you use mason-lspconfig the cmd for elixir-ls should be applied for you

ignamartinoli commented 2 years ago

Sorry, I had in mind to report this in a while and I didn't realized that it was solved in the meantime