@@ -49,11 +49,11 @@ The plugin provides several utilities:
4949update_current_function () -- Set/reset the b:lsp_current_function variable
5050diagnostics () -- Return a table with all diagnostic counts for the current buffer
5151messages () -- 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
5353register_client () -- Register a client for messages
5454-- 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
5757extensions = { clangd , pyls_ms }
5858-- Set up a client for use with lsp-status. Calls register_client() and sets up
5959-- buffer autocommands
@@ -69,13 +69,13 @@ status() -- One example out-of-the-box statusline component (as shown in the ima
6969[ ` clangd ` ] ( https://clangd.llvm.org/extensions.html#file-status ) and [ Microsoft's Python language
7070server] ( https://github.com/Microsoft/python-language-server ) (` python/setStatusBarMessage ` ,
7171` 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
7373the relevant LSP method name).
7474
7575** Note:** For ` clangd ` , you must also set ` init_options = { clangdFileStatus = true } ` .
7676
7777** 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.
7979
8080### Configuration
8181
@@ -84,7 +84,7 @@ configuration values. The following configuration options are supported:
8484
8585- ` kind_labels ` : An optional map from LSP symbol kinds to label symbols. Used to decorate the current function
8686 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
8888 should return ` true ` if ` document_symbol ` (a ` DocumentSymbol ` ) should be accepted as the symbol
8989 currently containing the cursor.
9090
@@ -126,7 +126,7 @@ local lsp_status = require('lsp-status')
126126-- to the string you want to display as a label
127127-- lsp_status.config { kind_labels = vim.g.completion_customize_lsp_label }
128128
129- -- Register the progress callback
129+ -- Register the progress handler
130130lsp_status .register_progress ()
131131```
132132
@@ -147,10 +147,10 @@ lsp_status.on_attach(client)
147147** Specific client configuration (following ` nvim-lsp ` conventions):**
148148``` lua
149149clangd = {
150- callbacks = lsp_status .extensions .clangd .setup ()
150+ handlers = lsp_status .extensions .clangd .setup ()
151151},
152152pyls_ms = {
153- callbacks = lsp_status .extensions .pyls_ms .setup ()
153+ handlers = lsp_status .extensions .pyls_ms .setup ()
154154},
155155```
156156
@@ -175,7 +175,7 @@ local nvim_lsp = require('nvim_lsp')
175175
176176-- Some arbitrary servers
177177nvim_lsp.clangd.setup({
178- callbacks = lsp_status.extensions.clangd.setup(),
178+ handlers = lsp_status.extensions.clangd.setup(),
179179 init_options = {
180180 clangdFileStatus = true
181181 },
@@ -184,7 +184,7 @@ nvim_lsp.clangd.setup({
184184})
185185
186186nvim_lsp.pyls_ms.setup({
187- callbacks = lsp_status.extensions.pyls_ms.setup(),
187+ handlers = lsp_status.extensions.pyls_ms.setup(),
188188 settings = { python = { workspaceSymbols = { enabled = true }}},
189189 on_attach = lsp_status.on_attach,
190190 capabilities = lsp_status.capabilities
0 commit comments