From 77a6049e07d070470d3274348ac61ab9b96cac6f Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Tue, 12 Jan 2021 13:47:34 -0800 Subject: lsp: fix on_attach signature documentation (#13723) * trim trailing whitespace from docs --- runtime/doc/lsp.txt | 6 +++--- runtime/lua/vim/lsp.lua | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index b9affb02b2..193593be13 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -639,8 +639,8 @@ client() *vim.lsp.client* automatically escalate and force shutdown. • is_stopped() Checks whether a client is stopped. Returns: true if the client is fully stopped. - • on_attach(bufnr) Runs the on_attach function from the - client's config if it was defined. + • on_attach(client, bufnr) Runs the on_attach function from the + client's config if it was defined. Useful for buffer-local setup. • Members • {id} (number): The id allocated to the client. @@ -1716,7 +1716,7 @@ make_workspace_params({added}, {removed}) Create the workspace params Parameters: ~ - {added} + {added} {removed} *vim.lsp.util.open_floating_preview()* diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 0326550245..1a814f5b6c 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -327,8 +327,9 @@ end --- Checks whether a client is stopped. --- Returns: true if the client is fully stopped. --- ---- - on_attach(bufnr) +--- - on_attach(client, bufnr) --- Runs the on_attach function from the client's config if it was defined. +--- Useful for buffer-local setup. --- --- - Members --- - {id} (number): The id allocated to the client. -- cgit