mason.nvim icon indicating copy to clipboard operation
mason.nvim copied to clipboard

Failed to run 'config' for mason.nvim

Open Saveljeffjonatan opened this issue 7 months ago • 14 comments

I've searched open issues for similar requests

  • [x] Yes

I've recently downloaded the latest plugin version of mason.nvim

  • [x] Yes

Problem description

After updating a package today I ran into this error:

Failed to run `config` for mason.nvim

...g.nvim/lua/mason-lspconfig/features/automatic_enable.lua:47: attempt to call field 'enable' (a nil value)

# stacktrace:
  - /mason-lspconfig.nvim/lua/mason-lspconfig/features/automatic_enable.lua:47 _in_ **fn**
  - /mason.nvim/lua/mason-core/functional/list.lua:116 _in_ **each**
  - /mason-lspconfig.nvim/lua/mason-lspconfig/features/automatic_enable.lua:56 _in_ **init**
  - /mason-lspconfig.nvim/lua/mason-lspconfig/init.lua:41 _in_ **setup**
  - ~/.config/nvim/lua/sethy/plugins/lsp/mason.lua:31 _in_ **config**
  - ~/.config/nvim/lua/sethy/lazy.lua:14
  - ~/.config/nvim/init.lua:2

Expected behavior

Mason to load with no problems installing ensured_installed packaged or just run.

Affected packages

All

Mason output

Installed
    ✓ clangd
    ✓ csharp-language-server csharp_ls
    ✓ css-lsp cssls
    ✓ elixir-ls elixirls
    ✓ emmet-language-server emmet_language_server
    ✓ emmet-ls emmet_ls
    ✓ eslint-lsp eslint
    ✓ gopls
    ✓ html-lsp html
    ✓ lua-language-server lua_ls
    ✓ pyright
    ✓ tailwindcss-language-server tailwindcss

Installation log

[INFO  Wed 07 May 2025 06:26:26 PM CEST] .../mason.nvim/lua/mason-core/installer/UninstallRunner.lua:37: Executing uninstaller for Package(name=clangd) {}
[INFO  Wed 07 May 2025 06:26:26 PM CEST] .../mason.nvim/lua/mason-core/installer/UninstallRunner.lua:61: Uninstallation succeeded for Package(name=clangd)
[INFO  Wed 07 May 2025 06:26:27 PM CEST] .../mason.nvim/lua/mason-core/installer/UninstallRunner.lua:37: Executing uninstaller for Package(name=clang-format) {}
[INFO  Wed 07 May 2025 06:26:27 PM CEST] .../mason.nvim/lua/mason-core/installer/UninstallRunner.lua:61: Uninstallation succeeded for Package(name=clang-format)
[INFO  Wed 07 May 2025 06:26:28 PM CEST] .../mason.nvim/lua/mason-core/installer/UninstallRunner.lua:37: Executing uninstaller for Package(name=cpplint) {}
[INFO  Wed 07 May 2025 06:26:29 PM CEST] .../mason.nvim/lua/mason-core/installer/UninstallRunner.lua:61: Uninstallation succeeded for Package(name=cpplint)
[INFO  Wed 07 May 2025 06:26:29 PM CEST] .../mason.nvim/lua/mason-core/installer/UninstallRunner.lua:37: Executing uninstaller for Package(name=cpptools) {}
[INFO  Wed 07 May 2025 06:26:29 PM CEST] .../mason.nvim/lua/mason-core/installer/UninstallRunner.lua:61: Uninstallation succeeded for Package(name=cpptools)
[INFO  Wed 07 May 2025 06:45:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=clangd) {
  debug = false,
  force = false,
  strict = false
}
[ERROR Wed 07 May 2025 06:45:21 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:93: Installation failed for Package(name=clangd) error="Installation was aborted."
[INFO  Wed 07 May 2025 06:47:25 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=clangd) {
  debug = false,
  force = false,
  strict = false
}
[ERROR Wed 07 May 2025 06:47:52 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:93: Installation failed for Package(name=clangd) error="Installation was aborted."
[INFO  Wed 07 May 2025 06:48:09 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=clangd) {
  debug = false,
  force = false,
  strict = false
}
[ERROR Wed 07 May 2025 06:48:13 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:93: Installation failed for Package(name=clangd) error="Installation was aborted."
[INFO  Wed 07 May 2025 06:50:06 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=clangd) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:50:20 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=clangd)
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=lua-language-server) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=elixir-ls) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=html-lsp) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=css-lsp) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=tailwindcss-language-server) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=emmet-ls) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=emmet-language-server) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=eslint-lsp) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=pyright) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=csharp-language-server) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=gopls) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:19 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=clangd) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:52:20 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=elixir-ls)
[INFO  Wed 07 May 2025 06:52:20 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=lua-language-server)
[INFO  Wed 07 May 2025 06:52:22 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=tailwindcss-language-server)
[INFO  Wed 07 May 2025 06:52:23 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=html-lsp)
[INFO  Wed 07 May 2025 06:52:24 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=emmet-ls)
[INFO  Wed 07 May 2025 06:52:24 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=css-lsp)
[INFO  Wed 07 May 2025 06:52:27 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=emmet-language-server)
[INFO  Wed 07 May 2025 06:52:27 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=eslint-lsp)
[INFO  Wed 07 May 2025 06:52:28 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=pyright)
[INFO  Wed 07 May 2025 06:52:30 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=csharp-language-server)
[INFO  Wed 07 May 2025 06:52:38 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=clangd)
[ERROR Wed 07 May 2025 06:52:40 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:93: Installation failed for Package(name=gopls) error="Installation was aborted."
[INFO  Wed 07 May 2025 06:55:33 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=lua-language-server) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 06:55:35 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=lua-language-server)
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=elixir-ls) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=html-lsp) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=css-lsp) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=tailwindcss-language-server) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=emmet-ls) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=emmet-language-server) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=eslint-lsp) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=pyright) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=csharp-language-server) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=gopls) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:00:37 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:40: Executing installer for Package(name=clangd) {
  debug = false,
  force = false,
  strict = false
}
[INFO  Wed 07 May 2025 07:01:38 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=elixir-ls)
[INFO  Wed 07 May 2025 07:01:38 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=tailwindcss-language-server)
[ERROR Wed 07 May 2025 07:01:40 PM CEST] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:225: Failed to spawn process. cmd="cargo", err="ENOENT: no such file or directory"
[ERROR Wed 07 May 2025 07:01:40 PM CEST] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:225: Failed to spawn process. cmd="luarocks", err="ENOENT: no such file or directory"
[ERROR Wed 07 May 2025 07:01:40 PM CEST] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:225: Failed to spawn process. cmd="ruby", err="ENOENT: no such file or directory"
[ERROR Wed 07 May 2025 07:01:40 PM CEST] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:225: Failed to spawn process. cmd="gem", err="ENOENT: no such file or directory"
[ERROR Wed 07 May 2025 07:01:40 PM CEST] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:225: Failed to spawn process. cmd="composer", err="ENOENT: no such file or directory"
[ERROR Wed 07 May 2025 07:01:40 PM CEST] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:225: Failed to spawn process. cmd="php", err="ENOENT: no such file or directory"
[ERROR Wed 07 May 2025 07:01:40 PM CEST] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:225: Failed to spawn process. cmd="javac", err="ENOENT: no such file or directory"
[ERROR Wed 07 May 2025 07:01:40 PM CEST] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:225: Failed to spawn process. cmd="julia", err="ENOENT: no such file or directory"
[INFO  Wed 07 May 2025 07:01:41 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=html-lsp)
[INFO  Wed 07 May 2025 07:01:41 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=css-lsp)
[INFO  Wed 07 May 2025 07:01:41 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=emmet-ls)
[INFO  Wed 07 May 2025 07:01:42 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=emmet-language-server)
[INFO  Wed 07 May 2025 07:01:44 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=eslint-lsp)
[INFO  Wed 07 May 2025 07:01:45 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=pyright)
[INFO  Wed 07 May 2025 07:01:45 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=csharp-language-server)
[INFO  Wed 07 May 2025 07:01:47 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installation succeeded for Package(name=gopls)
[INFO  Wed 07 May 2025 07:01:55 PM CEST] ...zy/mason.nvim/lua/mason-core/installer/InstallRunner.lua:86: Installa

Neovim version (>= 0.10.0)

NVIM v0.10.4 Build type: Release LuaJIT 2.1.1713484068

Operating system/version

Linux duckysensei 6.12.10-76061203-generic #202412060638~1743109366~22.04~1fce33b SMP PREEMPT_DYNAMIC Thu M x86_64 x86_64 x86_64 GNU/Linux

Healthcheck

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

mason.nvim ~
- OK mason.nvim version v2.0.0
- OK PATH: prepend
- OK Providers: 
    mason.providers.registry-api
    mason.providers.client
- OK neovim version >= 0.10.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2025-05-07-frayed-tank` 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.21.2 built on linux-gnu.`
- OK curl: `curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.18`
- OK gzip: `gzip 1.10`
- 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`

mason.nvim [Languages] ~
- WARNING cargo: not available
  - ADVICE:
    - spawn: cargo failed with exit code - and signal -. Could not find executable "cargo" in PATH.
      
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. Could not find executable "luarocks" in PATH.
      
- WARNING Ruby: not available
  - ADVICE:
    - spawn: ruby failed with exit code - and signal -. Could not find executable "ruby" in PATH.
      
- WARNING RubyGem: not available
  - ADVICE:
    - spawn: gem failed with exit code - and signal -. Could not find executable "gem" in PATH.
      
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. Could not find executable "composer" in PATH.
      
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. Could not find executable "php" in PATH.
      
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. Could not find executable "javac" in PATH.
      
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. Could not find executable "julia" in PATH.
      
- OK node: `v22.13.0`
- OK Go: `go version go1.24.1 linux/amd64`
- OK java: `openjdk version "11.0.27" 2025-04-15`
- OK python: `Python 3.10.12`
- OK npm: `10.9.2`
- OK pip: `pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)`
- OK python venv: `Ok`

Screenshots

No response

Saveljeffjonatan avatar May 07 '25 17:05 Saveljeffjonatan

Getting the same issue/output here. Started around 1h ago

20.04.1-Ubuntu SMP Wed Apr 16 08:29:56 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/share/nvim"

henriquealrs avatar May 07 '25 17:05 henriquealrs

had the same error after trying a lot of methods what worked for me was ...

creating a file at ~/.config/nvim/lua/plugins/mason-workaround.lua

with the following contents in it ->

return {
   { "mason-org/mason.nvim", version = "^1.0.0" },
   { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" },
 }

after that update and sync the plugins from Lazy and it should work

you can check my configs in my repo dotfile/config/nvim i also made some changes in the mason.lua file if this doesn't work maybe you can check that out

Deepanshusharwan avatar May 07 '25 18:05 Deepanshusharwan

had the same error after trying a lot of methods what worked for me was ...

creating a file at ~/.config/nvim/lua/plugins/mason-workaround.lua

with the following contents in it ->

return {
   { "mason-org/mason.nvim", version = "^1.0.0" },
   { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" },
 }

after that update and sync the plugins from Lazy and it should work

you can check my configs in my repo dotfile/config/nvim i also made some changes in the mason.lua file if this doesn't work maybe you can check that out

This did not solve the issue for me 👎

Saveljeffjonatan avatar May 07 '25 20:05 Saveljeffjonatan

Also experiencing this

stackanthony avatar May 08 '25 01:05 stackanthony

had the same error after trying a lot of methods what worked for me was ... creating a file at ~/.config/nvim/lua/plugins/mason-workaround.lua with the following contents in it ->

return {
   { "mason-org/mason.nvim", version = "^1.0.0" },
   { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" },
 }

after that update and sync the plugins from Lazy and it should work you can check my configs in my repo dotfile/config/nvim i also made some changes in the mason.lua file if this doesn't work maybe you can check that out

This did not solve the issue for me 👎

https://github.com/Deepanshusharwan/dotfiles/blob/main/config/nvim/lua/r2adio/plugins/lsp/lspconfig.lua

checkout the changes i made to the lspconfig.lua maybe you that will fix your errors

Deepanshusharwan avatar May 08 '25 03:05 Deepanshusharwan

After the latest update broke some things, here's how I locked Mason to v1.x in my LazyVim setup:

Before (~/.config/nvim/lua/plugins/mason.lua):

return {
  {
    "williamboman/mason.nvim",
    opts = {
      ensure_installed = {
        "stylua",
        "shellcheck",
        "shfmt",
        "flake8",
      },
    },
  },
}

After (working v1.x config):

return {
  {
    { "mason-org/mason.nvim", version = "^1.0.0" },  -- explicit v1 lock
    { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, -- same here
    opts = {
    -- This is just MY config, adjust for your needs
      ensure_installed = {  
        "stylua",
        "shellcheck",
        "shfmt",
        "flake8",
      },
    },
  },
}

Key changes:

  1. Switched to mason-org repos
  2. Pinned versions to v1.x

This worked for me on Neovim 0.11.1.

PaulParizacaMozo avatar May 08 '25 03:05 PaulParizacaMozo

Seems like the new version (2.0.0) also breaks my lsp inlay_hint, it took me almost a day until I found this issue. Yes, stay with v1 fix my problem.

Here is the error I got when I run 'Mason'

Image

longthanhtran avatar May 08 '25 08:05 longthanhtran

The latest version of mason-lspconfig requires nvim version >= 0.11.0.

https://github.com/mason-org/mason-lspconfig.nvim/blob/d39a75bbce4b8aad5d627191ea915179c77c100f/lua/mason-lspconfig/features/automatic_enable.lua#L47 This line called vim.lsp.enable(). The function is implemented at nvim version >= 0.11.0.

You can either not to use mason-lspconfig or update the nvim version.

henry-hsieh avatar May 08 '25 13:05 henry-hsieh

@longthanhtran I'm afraid screenshots don't help much in identifying the problem. Feel free to create an issue over at https://github.com/mason-org/mason.nvim/issues, use the Non-package related issue issue template and make sure to provide the information asked for.

williamboman avatar May 08 '25 14:05 williamboman

had the same error after trying a lot of methods what worked for me was ...

creating a file at ~/.config/nvim/lua/plugins/mason-workaround.lua

with the following contents in it ->

return {
   { "mason-org/mason.nvim", version = "^1.0.0" },
   { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" },
 }

after that update and sync the plugins from Lazy and it should work

you can check my configs in my repo dotfile/config/nvim i also made some changes in the mason.lua file if this doesn't work maybe you can check that out

Hey... I'm just going to piggy-back off of what ^^he said. This is just my implementation of his dot files, in a hopefully more straight forward way that works for me.

	{
		"williamboman/mason.nvim",
		dependencies = {
			"williamboman/mason-lspconfig.nvim",
			"WhoIsSethDaniel/mason-tool-installer.nvim",
			{ "mason-org/mason.nvim", version = "^1.0.0" },
			{ "mason-org/mason-lspconfig.nvim", version = "^1.0.0" },
		},
	},
	{
		"jay-babu/mason-null-ls.nvim",
		event = { "BufReadPre", "BufNewFile" },
		dependencies = {
			"williamboman/mason.nvim",
			"nvimtools/none-ls.nvim",
		},
		-- config = function()
		--     require("pluginInit.null_ls")
		-- end,
	},

igloo1505 avatar May 08 '25 19:05 igloo1505

The latest version of mason-lspconfig requires nvim version >= 0.11.0.

https://github.com/mason-org/mason-lspconfig.nvim/blob/d39a75bbce4b8aad5d627191ea915179c77c100f/lua/mason-lspconfig/features/automatic_enable.lua#L47 This line called vim.lsp.enable(). The function is implemented at nvim version >= 0.11.0.

You can either not to use mason-lspconfig or update the nvim version.

I updated to nvim version >= 0.11.1 and I still have the exact same issue 🤔

Saveljeffjonatan avatar May 08 '25 20:05 Saveljeffjonatan

@longthanhtran I'm afraid screenshots don't help much in identifying the problem. Feel free to create an issue over at https://github.com/mason-org/mason.nvim/issues, use the Non-package related issue issue template and make sure to provide the information asked for.

Yes, and thanks a lot for your reply, here is my issue. Please take a look whenever you have a chance.

longthanhtran avatar May 09 '25 01:05 longthanhtran

The latest version of mason-lspconfig requires nvim version >= 0.11.0. https://github.com/mason-org/mason-lspconfig.nvim/blob/d39a75bbce4b8aad5d627191ea915179c77c100f/lua/mason-lspconfig/features/automatic_enable.lua#L47 This line called vim.lsp.enable(). The function is implemented at nvim version >= 0.11.0. You can either not to use mason-lspconfig or update the nvim version.

I updated to nvim version >= 0.11.1 and I still have the exact same issue 🤔

I updated my nvim to this new version and removed the ~/.local/share/nvim directory, then reinstalled the plugins. When you install/update plugins, at least using "Lazy update", this directory is rebuilt cleanly. Now everything is perfect.

I'm using Pop_os! 22.04!

willkimen avatar May 09 '25 02:05 willkimen

Mason is quite mystical in many places. My solution is basically to clear, retry, clear, retry... maybe one time it will succeed, or it will successfully expose the core problem.

gitsang avatar Sep 19 '25 08:09 gitsang