Shougo / ddc-source-lsp

lsp source for ddc.vim
Other
66 stars 20 forks source link

Candidates not shown (from gopls) #26

Closed delphinus closed 2 years ago

delphinus commented 2 years ago

Problems summary

Candidates from nvim-lsp does not be shown (from gopls at least).

Expected

Environment Information

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

call ddc#custom#patch_global({
      \ 'sources': ['nvim-lsp', 'around'],
      \ 'sourceOptions': {
      \   '_': {'matchers': ['matcher_head']},
      \   'around': {'mark': 'A'},
      \   'nvim-lsp': {'mark': 'L', 'forceCompletionPattern': '\.\w*|:\w*|->\w*'},
      \ },
      \ })
call ddc#enable()

lua << EOF
  require'lspconfig'.gopls.setup{}
EOF

How to reproduce the problem from neovim/Vim startup (Required!)

  1. Run this Dockerfile.
  2. nvim hoge.go
  3. Seeing candidates from around, but no ones from nvim-lsp. See screencats below.

asciicast

Shougo commented 2 years ago

gopls does not work without project file. You need to create go project instead.

Shougo commented 2 years ago

For example if you edit the project files, it works.

https://github.com/saibing/bingo

delphinus commented 2 years ago

Ah, sorry. It works with go mod init.

hmm... but does not show in my box. I'm looking further.