Shougo / ddc-source-lsp

lsp source for ddc.vim
Other
67 stars 22 forks source link

Question about usage #36

Closed jeffwillette closed 2 years ago

jeffwillette commented 2 years ago

Hi. What is the suggested way to start the lsp for using this as a source?

For example, I have been trying to get this plugin to work with https://github.com/prabirshrestha/vim-lsp, as this old post about deoplete seems to indicate would work (https://jdhao.github.io/2020/11/04/replace_deoplete_jedi_for_LSP/)

Is ddc-source-nvim-lsp compatible with the above plugin, or should the lsp be started in some other way?

Shougo commented 2 years ago

If you use vim-lsp, you should use it instead.

https://github.com/shun/ddc-vim-lsp

ddc-source-nvim-lsp is for nvim-lsp. It is neovim only.

Shougo commented 2 years ago
set nocompatible
set runtimepath+=~/work/denops.vim
set runtimepath+=~/work/ddc.vim
set runtimepath+=~/work/ddc-around
set runtimepath+=~/work/ddc-matcher_head
set runtimepath+=~/work/ddc-sorter_rank
set runtimepath+=~/work/ddc-nvim-lsp
set runtimepath+=~/src/nvim-lspconfig

call ddc#custom#patch_global('sources', ['around', 'nvim-lsp'])

call ddc#custom#patch_global('sourceOptions', {
      \ '_': {
      \   'matchers': ['matcher_head'],
      \   'sorters': ['sorter_rank']},
      \ })

call ddc#enable()

lua require'lspconfig'.pylsp.setup{}
jeffwillette commented 2 years ago

Thanks for the info and the example. That would have taken me a long time to figure out on my own. It works great now