docs(lsp): add supports_method to vim.lsp.client docs (#26852)

This commit is contained in:
Mathias Fußenegger 2024-01-02 18:52:29 +01:00 committed by GitHub
parent 5dc0bdfe98
commit 91d76ac941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -745,6 +745,10 @@ client() *vim.lsp.client*
client is fully stopped.
• on_attach(client, bufnr) Runs the on_attach function from the client's
config if it was defined. Useful for buffer-local setup.
• supports_method(method, [opts]): boolean Checks if a client supports a
given method. Always returns true for unknown off-spec methods. [opts]
is a optional `{bufnr?: integer}` table. Some language server
capabilities can be file specific.
• Members
• {id} (number): The id allocated to the client.

View File

@ -425,6 +425,12 @@ end
--- Runs the on_attach function from the client's config if it was defined.
--- Useful for buffer-local setup.
---
--- - supports_method(method, [opts]): boolean
--- Checks if a client supports a given method.
--- Always returns true for unknown off-spec methods.
--- [opts] is a optional `{bufnr?: integer}` table.
--- Some language server capabilities can be file specific.
---
--- - Members
--- - {id} (number): The id allocated to the client.
---