@@ -49,11 +49,11 @@ The plugin provides several utilities:
49
49
update_current_function () -- Set/reset the b:lsp_current_function variable
50
50
diagnostics () -- Return a table with all diagnostic counts for the current buffer
51
51
messages () -- Return a table listing progress and other status messages for display
52
- register_progress () -- Register the provided callback for progress messages
52
+ register_progress () -- Register the provided handler for progress messages
53
53
register_client () -- Register a client for messages
54
54
-- Integrate misc. LS protocol extensions into the messages framework
55
- -- Each extension table contains a set of callbacks and a setup() function
56
- -- returning said callbacks
55
+ -- Each extension table contains a set of handlers and a setup() function
56
+ -- returning said handlers
57
57
extensions = { clangd , pyls_ms }
58
58
-- Set up a client for use with lsp-status. Calls register_client() and sets up
59
59
-- buffer autocommands
@@ -69,13 +69,13 @@ status() -- One example out-of-the-box statusline component (as shown in the ima
69
69
[ ` clangd ` ] ( https://clangd.llvm.org/extensions.html#file-status ) and [ Microsoft's Python language
70
70
server] ( https://github.com/Microsoft/python-language-server ) (` python/setStatusBarMessage ` ,
71
71
` python/beginProgress ` , ` python/reportProgress ` , and ` python/endProgress ` ). To use these extensions,
72
- register the callbacks provided in the ` extensions ` table (the keys for the callbacks are
72
+ register the handlers provided in the ` extensions ` table (the keys for the handlers are
73
73
the relevant LSP method name).
74
74
75
75
** Note:** For ` clangd ` , you must also set ` init_options = { clangdFileStatus = true } ` .
76
76
77
77
** New** : You can also call ` lsp_status.extensions.<server name>.setup() ` to return the full set of
78
- callbacks , as shown below.
78
+ handlers , as shown below.
79
79
80
80
### Configuration
81
81
@@ -84,7 +84,7 @@ configuration values. The following configuration options are supported:
84
84
85
85
- ` kind_labels ` : An optional map from LSP symbol kinds to label symbols. Used to decorate the current function
86
86
name. Default: ` {} `
87
- - ` select_symbol ` : An optional callback of the form ` function(cursor_pos, document_symbol) ` that
87
+ - ` select_symbol ` : An optional handler of the form ` function(cursor_pos, document_symbol) ` that
88
88
should return ` true ` if ` document_symbol ` (a ` DocumentSymbol ` ) should be accepted as the symbol
89
89
currently containing the cursor.
90
90
@@ -126,7 +126,7 @@ local lsp_status = require('lsp-status')
126
126
-- to the string you want to display as a label
127
127
-- lsp_status.config { kind_labels = vim.g.completion_customize_lsp_label }
128
128
129
- -- Register the progress callback
129
+ -- Register the progress handler
130
130
lsp_status .register_progress ()
131
131
```
132
132
@@ -147,10 +147,10 @@ lsp_status.on_attach(client)
147
147
** Specific client configuration (following ` nvim-lsp ` conventions):**
148
148
``` lua
149
149
clangd = {
150
- callbacks = lsp_status .extensions .clangd .setup ()
150
+ handlers = lsp_status .extensions .clangd .setup ()
151
151
},
152
152
pyls_ms = {
153
- callbacks = lsp_status .extensions .pyls_ms .setup ()
153
+ handlers = lsp_status .extensions .pyls_ms .setup ()
154
154
},
155
155
```
156
156
@@ -175,7 +175,7 @@ local nvim_lsp = require('nvim_lsp')
175
175
176
176
-- Some arbitrary servers
177
177
nvim_lsp.clangd.setup({
178
- callbacks = lsp_status.extensions.clangd.setup(),
178
+ handlers = lsp_status.extensions.clangd.setup(),
179
179
init_options = {
180
180
clangdFileStatus = true
181
181
},
@@ -184,7 +184,7 @@ nvim_lsp.clangd.setup({
184
184
})
185
185
186
186
nvim_lsp.pyls_ms.setup({
187
- callbacks = lsp_status.extensions.pyls_ms.setup(),
187
+ handlers = lsp_status.extensions.pyls_ms.setup(),
188
188
settings = { python = { workspaceSymbols = { enabled = true }}},
189
189
on_attach = lsp_status.on_attach,
190
190
capabilities = lsp_status.capabilities
0 commit comments