Shougo / ddu-ui-ff

Fuzzy finder UI for ddu.vim
MIT License
55 stars 26 forks source link

ddu says Invalid ui: "ff" #67

Closed Dzzt closed 1 year ago

Dzzt commented 1 year ago

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

Maybe just after the fix in last week, not for sure when I execute this in EX the first time after start Neovim

:call ddu#start({})

nothing happens. and afte that, this command starts saying

[ddu] Invalid ui: "ff"

Expected

shows pop up menu

Environment Information

Provide a minimal init.vim/vimrc without plugin managers (Required!)

"init.vim for ddu-ui-ff test

let s:neovim_dir = expand('~/.config/nvim')
execute 'set runtimepath+=' . s:neovim_dir

filetype plugin indent on
syntax on

" --------------------------------------------------
"
"Directory where plugins are installed in
let s:dein_dir = expand("~/.cache/dein.vim")
let s:dein_repo_dir = s:dein_dir . '/repos'

execute 'set runtimepath+=' . s:dein_dir
execute 'set runtimepath+=' . s:dein_repo_dir
execute 'set runtimepath+=' . s:dein_repo_dir . '/github.com/Shougo/dein.vim'
execute 'set runtimepath+=' . s:dein_repo_dir . '/github.com/vim-denops/denops.vim'
execute 'set runtimepath+=' . s:dein_repo_dir . '/github.com/Shougo/ddu.vim'
execute 'set runtimepath+=' . s:dein_repo_dir . '/github.com/Shougo/ddu-ui-ff'

"Load plugins

call dein#begin(s:dein_dir)

call dein#add('vim-denops/denops.vim')
call dein#add('Shougo/ddu.vim')
call dein#add('Shougo/ddu-ui-ff')
call dein#add('Shougo/ddu-source-file')

call dein#end()    

if dein#check_install()
    call dein#install()
endif

call ddu#custom#patch_global(#{
\ ui: 'ff',
\ sources: [
\     #{name: 'file'},
\     ]
\})

nnoremap <buffer><silent> q <Cmd>call ddu#ui#ff#do_action('quit')<CR>
nnoremap <silent> ;h <Cmd>call ddu#start(#{sources: [#{name: 'file'}]})<CR>

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

execute this :call ddu#start({})

Screenshot (if possible)

2023-03-08 15_17_19-Neovim

Shougo commented 1 year ago

The minimal init.vim

set rtp+=~/work/denops.vim
set rtp+=~/work/ddu.vim
set rtp+=~/work/ddu-ui-ff
set rtp+=~/work/ddu-source-file

filetype plugin indent on
syntax on
"----------------------------------------------------------------

call ddu#custom#patch_global(#{
\ ui: 'ff',
\ sources: [
\     #{name: 'file'},
\     ]
\})

nnoremap <buffer><silent> q <Cmd>call ddu#ui#ff#do_action('quit')<CR>
nnoremap <silent> ;h <Cmd>call ddu#start(#{sources: [#{name: 'file'}]})<CR>

It works for me in neovim 0.9.

Maybe just after the fix in last week, not for sure when I execute this in EX the first time after start Neovim

Please bisect the commit and upload the full messages by :messages.

Dzzt commented 1 year ago

With the minimal init.vim you instructed

  1. start nvim.exe
    nvim started with no error messages.

  2. :call ddu#start({}) nothing happens with no messages.

  3. :call ddu#start({}) again shows a message [ddu] Invalid ui: "ff"

  4. :message only [ddu] Invalid ui: "ff" is shown 2023-03-09 09_25_57-Administrator_ Pwsh

Dzzt commented 1 year ago

A couple of minutes after I left nvim opened with the error , I found nvim.exe put this error.

[denops] Error: Failed to call 'start' with [{"sources":[{"name":"file"}]}]: TypeError: error sending request for url (https://deno.land/x/ddu_vim@v2.3.0/types.ts): error trying to connect: tls handshake eof [denops] at file:///C:/Users/user1/.cache/dein_test.vim/repos/github.com/Shougo/ddu-ui-ff/denops/@ddu-uis/ff.ts:9:8 [denops] at async Ddu.register (file:///C:/Users/user1/.cache/dein_test.vim/repos/github.com/Shougo/ddu.vim/denops/ddu/ddu.ts:1210:17) [denops] at async file:///C:/Users/user1/.cache/dein_test.vim/repos/github.com/Shougo/ddu.vim/denops/ddu/ddu.ts:1283:7 [denops] at async Promise.all (index 0) [denops] at async Ddu.autoload (file:///C:/Users/user1/.cache/dein_test.vim/repos/github.com/Shougo/ddu.vim/denops/ddu/ddu.ts:1282:5) [denops] at async Ddu.getUi (file:///C:/Users/user1/.cache/dein_test.vim/repos/github.com/Shougo/ddu.vim/denops/ddu/ddu.ts:1349:7) [denops] at async Ddu.start (file:///C:/Users/user1/.cache/dein_test.vim/repos/github.com/Shougo/ddu.vim/denops/ddu/ddu.ts:198:39) [denops] at async Session.start (file:///C:/Users/user1/.cache/dein_test.vim/repos/github.com/Shougo/ddu.vim/denops/ddu/app.ts:134:7) [denops] at async Session.dispatch (https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:99:12) [denops] at async https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:108:18 [denops] at async Session.handleRequest (https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:104:29) [denops] at Session.call (https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:207:13) [denops] at async Service.dispatch (file:///C:/Users/user1/.cache/dein_test.vim/repos/github.com/vim-denops/denops.vim/denops/@denops-private/service.ts:117:14) [denops] at async Session.invoke (file:///C:/Users/user1/.cache/dein_test.vim/repos/github.com/vim-denops/denops.vim/denops/@denops-private/host/nvim.ts:57:16) [denops] at async Session.dispatch (https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:99:12) [denops] at async Session.handleNotification (https://deno.land/x/msgpack_rpc@v3.1.6/session.ts:130:7)

Shougo commented 1 year ago

Hm. If so, it is your network error instead of ddu-ui-ff.

Shougo commented 1 year ago

nothing happens with no messages.

Hm. It seems it takes time to load. But your network seems download failed. You can clear deno cache.

https://zenn.dev/kawarimidoll/articles/3f06083cb03b25

Shougo commented 1 year ago

I will test it later in Windows. If it works, it is not problem of plugins.

Please test ddu.vim in other environments.

Dzzt commented 1 year ago

As you said this might not be a matter of plugins but network. As the network administrator of my office says my company stopped using https\://proxy.mycompany.com months ago, then I changed https_proxy to http://... After that and once clear all environment and reinstall, ddu-ui-ff and all sources and filters start working (some sources and filters are still 'Invalid' with full configuration though).

I apologize bothering you with such trifle basic matters(again).

Shougo commented 1 year ago

Oh, so it is fixed?

some sources and filters are still 'Invalid' with full configuration though

You should check plugins reinstall. Dein.vim has call dein#reinstall() for it.

Shougo commented 1 year ago

Hi. I have tested ddu.vim in Windows environment and it works. So I close it.

Dzzt commented 1 year ago

Sorry to add to closed thread. After I added all sources, filters and ui to runtimepath, all starts working as it used to do. In fact, network issue was temporary noise and this would be the reason of this trouble. I'm sure all used to be working as I expected without this....