lsp completion for ddc.vim
https://github.com/vim-denops/denops.vim
https://github.com/Shougo/ddc.vim
Supported LSP clients are "nvim-lsp", "vim-lsp" and "lspoints"
https://github.com/prabirshrestha/vim-lsp
https://github.com/kuuote/lspoints
To take advantage of all the features, you need to set client_capabilities.
local capabilities = require("ddc_source_lsp").make_client_capabilities()
require("lspconfig").denols.setup({
capabilities = capabilities,
})
call ddc#custom#patch_global('sources', ['lsp'])
call ddc#custom#patch_global('sourceOptions', #{
\ lsp: #{
\ mark: 'lsp',
\ forceCompletionPattern: '\.\w*|:\w*|->\w*',
\ },
\ })
call ddc#custom#patch_global('sourceParams', #{
\ lsp: #{
\ snippetEngine: denops#callback#register({
\ body -> vsnip#anonymous(body)
\ }),
\ enableResolveItem: v:true,
\ enableAdditionalTextEdit: v:true,
\ }
\ })
It based on cmp-core-example.