Skip to content

Commit 291ea90

Browse files
saghengithub-actions[bot]
authored andcommitted
docs: update vimdocs
1 parent 527ae77 commit 291ea90

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

doc/blink-cmp.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,41 @@ This can vary by config, but in general for nvim-lspconfig:
223223
<
224224

225225

226+
MERGING LSP CAPABILITIES
227+
228+
Blink.cmp’s `get_lsp_capabilities` function includes the built-in LSP
229+
capabilities by default. To merge with your own capabilities, use the first
230+
argument, which acts as an override.
231+
232+
>lua
233+
local capabilities = {
234+
textDocument = {
235+
foldingRange = {
236+
dynamicRegistration = false,
237+
lineFoldingOnly = true
238+
}
239+
}
240+
}
241+
242+
capabilities = require('blink.cmp').get_lsp_capabilities(capabilities)
243+
244+
-- or equivalently
245+
246+
local capabilities = vim.lsp.protocol.make_client_capabilities()
247+
248+
capabilities = vim.tbl_deep_extend('force', capabilities, require('blink.cmp').get_lsp_capabilities({}, false))
249+
250+
capabilities = vim.tbl_deep_extend('force', {
251+
textDocument = {
252+
foldingRange = {
253+
dynamicRegistration = false,
254+
lineFoldingOnly = true
255+
}
256+
}
257+
})
258+
<
259+
260+
226261
MINI.DEPS *blink-cmp-installation-mini.deps*
227262

228263
The following section includes only the installation and, optionally, building

0 commit comments

Comments
 (0)