Skip to content

Deprecation warning: client.supports_method called with dot syntax in lsp.lua #12

Description

@juniorsantos

Hi! On Neovim 0.11+ BetterVim triggers a deprecation warning coming from the core:

client.supports_method is deprecated. Feature will be removed in Nvim 0.13

Cause

In lua/better-vim-core/lsp.lua, inside the null_ls.setup on_attach (format on save), the client method is called with dot syntax:

local can_format_client = client.supports_method("textDocument/formatting")

Since Neovim 0.11 this must be called as a method (colon syntax). The same file already uses the new form elsewhere (client:supports_method("textDocument/formatting", bufnr)), so it's just this one line.

Fix

local can_format_client = client:supports_method("textDocument/formatting")

Patched locally and confirmed the warning is gone, format on save still working.

Environment

  • BetterVim v4.0.6
  • Neovim v0.12.4 (macOS, Homebrew)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions