diff options
Diffstat (limited to 'runtime/doc/lsp.txt')
-rw-r--r-- | runtime/doc/lsp.txt | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index af3189a393..841ed36421 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1120,19 +1120,13 @@ format({options}) *vim.lsp.buf.format()* • bufnr (number|nil): Restrict formatting to the clients attached to the given buffer, defaults to the current buffer (0). - • filter (function|nil): Predicate to filter clients used - for formatting. Receives the list of clients attached to - bufnr as the argument and must return the list of - clients on which to request formatting. Example: • > + • filter (function|nil): Predicate used to filter clients. + Receives a client as argument and must return a boolean. + Clients matching the predicate are included. Example: • > -- Never request typescript-language-server for formatting vim.lsp.buf.format { - filter = function(clients) - return vim.tbl_filter( - function(client) return client.name ~= "tsserver" end, - clients - ) - end + filter = function(client) return client.name ~= "tsserver" end } < • async boolean|nil If true the method won't block. |