Shougo / ddc-source-lsp

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

[BUG] When using html-lsp, ui-pum in ddc may remain #60

Closed uga-rosa closed 3 months ago

uga-rosa commented 3 months ago

Environment

Ubuntu 22.04.4 LTS NVIM v0.10.0-dev-e948d7f deno 1.43.1 (release, x86_64-unknown-linux-gnu)

And all plugins are up-to-date.

minimal config

set rtp+=/path/to/denops.vim
set rtp+=/path/to/ddc.vim
set rtp+=/path/to/pum.vim
set rtp+=/path/to/ddc-ui-pum
set rtp+=/path/to/ddc-filter-matcher_head
set rtp+=/path/to/ddc-filter-sorter_rank
set rtp+=/path/to/ddc-source-lsp
set rtp+=/path/to/nvim-lspconfig

lua << EOL
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true

require'lspconfig'.html.setup {
  capabilities = capabilities,
}
EOL

call ddc#custom#patch_global(#{
      \ ui: 'pum',
      \ sources: ['lsp'],
      \ sourceOptions: #{
      \   lsp: #{
      \     mark: 'lsp',
      \     minAutoCompleteLength: 1,
      \     matchers: ['matcher_head'],
      \     sorters: ['sorter_rank'],
      \   }
      \ },
      \})
call ddc#enable()
<!DOCTYPE html>
<html>

<body>
  <label></label>
  <br>
</body>

</html>

Step to reproduce

  1. Open src/index.html (e.g. NVIM_APPNAME=minimal nvim src/index.html)
  2. Insert cursor after <br>
  3. Type <br>
  4. Hitting the final > breaks the ui-pum state so that it continues to remain.

html

Shougo commented 3 months ago

Reproduced.

Shougo commented 3 months ago

Fixed.