williamboman / mason-lspconfig.nvim

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

mason-lspconfig don't recognize cmakelang #307

Open sadtab opened 1 year ago

sadtab commented 1 year ago

Problem description

I can manually install cmakelang server within :Mason ui, but mason-lspconfig.nvim with following minimal conf :

return {
    "williamboman/mason-lspconfig.nvim",
    dependencies = {
        "williamboman/mason.nvim",
        "neovim/nvim-lspconfig",
    },
    opts = {
        ensure_installed = {
            "cmakelang", -- cmake
        },
    }
}

throws warning :

mason-lspconfig.nvim [mason-lspconfig.nvim] Server "cmakelang" is not a valid entry in ensure_installed. Make sure to only provide lspconfig server names.

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

cmakelang should be a valid entry for mason-lspconfig as it is installable by MasonInstall command

Neovim version (>= 0.7)

NVIM v0.9.4 Build type: RelWithDebInfo LuaJIT 2.1.1692716794

Operating system/version

ubuntu

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

cmakelang

Steps to reproduce

Just try to include cmakelang in ensure_installed

Actual behavior

Warning :

Server "cmakelang" is not a valid entry in ensure_installed

Expected behavior

Install cmakelang automatically

LspInfo

N/A

LspLog

No response

Healthcheck

mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.8.1
- OK PATH: prepend
- OK Providers: 
  mason.providers.registry-api
  mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2023-10-30-common-movie` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.`
- OK wget: `GNU Wget 1.20.3 built on linux-gnu.`
- OK curl: `curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3`
- OK gzip: `gzip 1.10`
- OK tar: `tar (GNU tar) 1.30`
- OK bash: `GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- OK Ruby: `ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]`
- OK node: `v20.9.0`
- OK Go: `go version go1.21.3 linux/amd64`
- OK RubyGem: `3.1.2`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK python: `Python 3.8.10`
- OK java: `Picked up _JAVA_OPTIONS: -Djava.util.prefs.userRoot=/home/stabei/.config/java`
- OK cargo: `cargo 1.73.0 (9c4383fb5 2023-08-26)`
- OK javac: `Ok`
- OK npm: `10.1.0`
- OK pip: `pip 23.3.1 from /home/stabei/.local/lib/python3.8/site-packages/pip (python 3.8)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 5000. Limit: 5000. Reset: Mon 30 Oct 2023 02:23:10 PM EDT.


### Screenshots or recordings

_No response_
williamboman commented 1 year ago

Hey! This is because there's a mapping missing between mason <-> lspconfig. PR is very much welcomed (see for example https://github.com/williamboman/mason-lspconfig.nvim/pull/304), else I'll get around to it soon.

sadtab commented 1 year ago

Thanks, I will post a PR as soon as I 've some free time