@@ -40,7 +40,7 @@ call packager#add('wbthomason/lsp-status.nvim')
40
40
41
41
## Usage
42
42
43
- The plugin provides several functions which you can call :
43
+ The plugin provides several utilities :
44
44
``` lua
45
45
update_current_function () -- Set/reset the b:lsp_current_function variable
46
46
diagnostics () -- Return a table with all diagnostic counts for the current buffer
@@ -55,6 +55,8 @@ extensions = { clangd, pyls_ms }
55
55
-- buffer autocommands
56
56
on_attach (client )
57
57
config (config_vals ) -- Configure lsp-status
58
+ -- Table of client capabilities extended to signal support for progress messages
59
+ capabilities
58
60
status () -- One example out-of-the-box statusline component (as shown in the images above)
59
61
```
60
62
### Protocol Extensions
@@ -66,6 +68,8 @@ server](https://github.com/Microsoft/python-language-server) (`python/setStatusB
66
68
register the callbacks provided in the ` extensions ` table (the keys for the callbacks are
67
69
the relevant LSP method name).
68
70
71
+ ** Note:** For ` clangd ` , you must also set ` init_options = { clangdFileStatus = true } ` .
72
+
69
73
** New** : You can also call ` lsp_status.extensions.<server name>.setup() ` to return the full set of
70
74
callbacks, as shown below.
71
75
@@ -119,6 +123,12 @@ lsp_status.config { kind_labels = vim.g.completion_customize_lsp_label }
119
123
lsp_status .register_progress ()
120
124
```
121
125
126
+ ** Before calling ` setup ` for each relevant LSP client:**
127
+ ``` lua
128
+ -- Set default client capabilities plus window/workDoneProgress
129
+ config .capabilities = vim .tbl_extend (' keep' , config .capabilities or {}, lsp_status .capabilities )
130
+ ```
131
+
122
132
** In an ` on_attach ` function for each relevant LSP client:**
123
133
``` lua
124
134
-- Register client for messages and set up buffer autocommands to update
0 commit comments