Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix usage of deprecated Neovim APIs #1703

Merged
merged 1 commit into from
May 11, 2024

Conversation

williamboman
Copy link
Owner

No description provided.

@williamboman williamboman force-pushed the fix/deprecated-neovim-apis branch 3 times, most recently from ab96b38 to 91b8e08 Compare May 11, 2024 19:17
@williamboman williamboman merged commit 0f1cb65 into main May 11, 2024
14 checks passed
@williamboman williamboman deleted the fix/deprecated-neovim-apis branch May 11, 2024 19:22
@erogers88
Copy link

erogers88 commented May 11, 2024

@williamboman

This change broke my configuration. It seems that I was using this "deprecated" API, the vim.tbl_keys() in mason_lspconfig.setup()'s ensure_installed parameter, and I got an error when this happened.

      local servers = {

        lua_ls = {
          Lua = {
            workspace = { checkThirdParty = false },
            telemetry = { enable = false },
          }
        },
        pyright = {},
        bashls = {}
      }

      mason_lspconfig.setup {
        ensure_installed = vim.tbl_keys(servers),
      }

Error Message

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

I was able to fix it by passing in a normal lua table:

      mason_lspconfig.setup {
        ensure_installed = servers,
      }

Should we let people know that their configuration might be broken now because of this? Maybe you can add it into the release notes? Also, how can I make myself aware of when things like this get deprecated?

Thanks for all your work, I love Mason by the way.

erogers88 added a commit to erogers88/dotfiles that referenced this pull request May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants