Code Monkey home page Code Monkey logo

ddu-ui-filer's Introduction

ddu-ui-filer

File listing UI for ddu.vim

Note: I have created Japanese article for ddu-ui-filer.

Required

denops.vim

https://github.com/vim-denops/denops.vim

ddu.vim

https://github.com/Shougo/ddu.vim

Configuration

call ddu#custom#patch_global(#{
    \   ui: 'filer',
    \   actionOptions: #{
    \     narrow: #{
    \       quit: v:false,
    \     },
    \   },
    \ })

For macOS

Because of the use of the "gio" command, desktop-file-utils should be installed on macOS.

$ brew install desktop-file-utils

ddu-ui-filer's People

Contributors

hasundue avatar hori-ryota avatar kuuote avatar matsui54 avatar n-ombro avatar nabezokodaikon avatar ryota2357 avatar shougo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ddu-ui-filer's Issues

Level 1 items are displayed multiple times when redrawing with nested (expanded 1 level or more deep) items

Problems summary

Level 1 items are displayed multiple times when redrawing with nested (expanded 1 level or more deep) items and not expanded level 2 items.

If executing redraw with nested expanded items, expandedItems will contains duplicated level 0 items like followings.

- a item with level 0 path as `search`
- a item with level 1 path as `search`

This will execute expandItem multiple times, and level 1 items will be displayed for the number of executions.

Expected

Level 1 items are displayed once.

Environment Information

  • ddu-ui-filer version (SHA1):

331b70ab12de5395e5d64630186020de24277c88

  • denops.vim version (SHA1):

6578820fb79b1ae45e0dd448fd96dd6deb2f7be0

  • deno version(deno -V output):

deno 1.28.3

  • OS:

macOS 12.6.2

  • neovim/Vim :version output:
NVIM v0.8.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Features: +acl +iconv +tui

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

set runtimepath+=path/to/denops.vim
set runtimepath+=path/to/ddu.vim
set runtimepath+=path/to/ddu-ui-filer
set runtimepath+=path/to/ddu-column-filename
set runtimepath+=path/to/ddu-source-file
set runtimepath+=path/to/ddu-kind-file

nnoremap <silent> <space>e <Cmd>call ddu#start({
      \   'ui': 'filer',
      \   'sync': v:true,
      \   'sources': [{
      \     'name': 'file',
      \     'options': {
      \       'path': getcwd(),
      \       'columns': ['filename'],
      \     },
      \   }],
      \ })<CR>

nnoremap <silent> <space>o <Cmd>call ddu#ui#filer#do_action('expandItem')<CR>
nnoremap <silent> <space>a <Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'newFile'})<CR>

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

  1. (prepare) create nested directory at your workspace
  2. Open ddu filer ( <space>e )
  3. Expand a directory ( <space>o )
  4. Expand a nested directory ( <space>o )
  5. Create a new file (to redraw tree) ( <space>a )

Screenshot (if possible)

testfile is created file, ddu directory is duplicated.

Screen Shot 2023-01-10 at 2 38 44

Upload the log messages by :redir and :message (if errored)

do_action('expandItem') do not work when toggle of uiParam is v:true

Problems summary

When setting toggle of uiParam is v:true, ddu#ui#filer#do_action('expandItem') is not expand directory.

this is caused for both vim and neovim.

Expected

Expand directory as when toggle of uiParams is v:false.

Environment Information

All plugin I'm using is the latest version.

  • deno version(deno -V output) deno 1.23.1
  • version output
vim
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jun 28 2022 12:44:46)
macOS 版 - arm64
Compiled by Homebrew
Huge 版 without GUI.  機能の一覧 有効(+)/無効(-)
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     +perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby              +wildignore
+cursorbind        +lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        -mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary
-farsi             -mouse_sysmouse    -tag_old_static
      システム vimrc: "$VIM/vimrc"
      ユーザー vimrc: "$HOME/.vimrc"
   第2ユーザー vimrc: "~/.vim/vimrc"
       ユーザー exrc: "$HOME/.exrc"
  デフォルトファイル: "$VIMRUNTIME/defaults.vim"
       省略時の $VIM: "/opt/homebrew/share/vim"
コンパイル: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
リンク: clang -L. -fstack-protector-strong -L/opt/homebrew/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/opt/readline/lib -o vim -lm -lncurses -liconv -lintl -framework AppKit -L/opt/homebrew/opt/lua/lib -llua5.4 -mmacosx-version-min=12.0 -fstack-protector-strong -L/opt/homebrew/Cellar/perl/5.34.0/lib/perl5/5.34.0/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin -lpython3.10 -framework CoreFoundation -lruby.3.1 -L/opt/homebrew/Cellar/ruby/3.1.2/lib
nvim
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

      システム vimrc: "$VIM/sysinit.vim"
       省略時の $VIM: "/opt/homebrew/Cellar/neovim/0.7.2/share/nvim"

Run :checkhealth for more info

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

if !has("nvim")
  set nocompatible
  filetype plugin indent on
  syntax enable
endif

let s:plugins = [
      \ 'vim-denops/denops.vim',
      \ 'Shougo/ddu.vim',
      \ 'Shougo/ddu-ui-filer',
      \ 'Shougo/ddu-column-filename',
      \ 'Shougo/ddu-source-file',
      \ 'Shougo/ddu-kind-file',
      \ ]
for item in s:plugins
  execute 'set runtimepath+=~/.cache/dein/repos/github.com/' . item
endfor

call ddu#custom#patch_global({
    \   'ui': 'filer',
    \   'sources': [{'name': 'file', 'params': {}}],
    \   'sourceOptions': {
    \     '_': {
    \       'columns': ['filename'],
    \     },
    \   },
    \  'uiParams': {
    \    'filer': {
    \      'toggle': v:true,
    \    }
    \   },
    \   'kindOptions': {
    \     'file': {
    \       'defaultAction': 'open',
    \     },
    \   }
    \ })

autocmd FileType ddu-filer call s:ddu_my_settings()
function! s:ddu_my_settings() abort
  nnoremap <buffer><silent>o <Cmd>call ddu#ui#filer#do_action('expandItem')<CR>
endfunction

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

:call ddu#start({})

then, push o on the directory item.

minWidth is applied as the height of the window

Problems summary

  • When split vertically, minWidth is applied as the height of the window.

Expected

  • Expected to be applied as window width.

Environment Information

  • ddu.vim version (SHA1): 1e27d809ede929124d3f44576e773c383a7f3580

  • denops.vim version (SHA1): 4e694e1ebd868e7448e7f6f82e844c88719f0756

  • ddu-ui-filer version (SHA1): e04e494053f3d2094504b43c25a349963e0b944d

  • deno version(deno -V output): deno 1.21.2

  • OS: macOS Monterey 12.3.1 (21E258)

  • neovim/Vim :version output:

version output
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 24 2021 14:13:28)
macOS 版 - x86_64
適用済パッチ: 1-3455
Compiled by GitHub Actions
Huge 版 with MacVim GUI.  機能の一覧 有効(+)/無効(-)
+acl               +comments          +find_in_path      +linebreak         +mouse_xterm       +quickfix          -tcl               +viminfo
+arabic            +conceal           +float             +lispindent        +multi_byte        +reltime           +termguicolors     +vreplace
+autocmd           +cryptv            +folding           +listcmds          +multi_lang        +rightleft         +terminal          +wildignore
+autochdir         +cscope            -footer            +localmap          -mzscheme          +ruby/dyn          +terminfo          +wildmenu
-autoservername    +cursorbind        +fork()            +lua/dyn           +netbeans_intg     +scrollbind        +termresponse      +windows
+balloon_eval      +cursorshape       +fullscreen        +menu              +num64             +signs             +textobjects       +writebackup
+balloon_eval_term +dialog_con_gui    +gettext           +mksession         +odbeditor         +smartindent       +textprop          -X11
+browse            +diff              -hangul_input      +modify_fname      +packages          -sodium            +timers            -xfontset
++builtin_terms    +digraphs          +iconv             +mouse             +path_extra        -sound             +title             +xim
+byte_offset       +dnd               +insert_expand     +mouseshape        +perl/dyn          +spell             +toolbar           -xpm
+channel           -ebcdic            +ipv6              +mouse_dec         +persistent_undo   +startuptime       +transparency      -xsmp
+cindent           +emacs_tags        +job               -mouse_gpm         +popupwin          +statusline        +user_commands     -xterm_clipboard
+clientserver      +eval              +jumplist          -mouse_jsbterm     +postscript        -sun_workshop      +vartabs           -xterm_save
+clipboard         +ex_extra          +keymap            +mouse_netterm     +printer           +syntax            +vertsplit
+cmdline_compl     +extra_search      +lambda            +mouse_sgr         +profile           +tag_binary        +virtualedit
+cmdline_hist      -farsi             +langmap           -mouse_sysmouse    +python/dyn        -tag_old_static    +visual
+cmdline_info      +file_in_path      +libcall           +mouse_urxvt       +python3/dyn       -tag_any_white     +visualextra
      システム vimrc: "$VIM/vimrc"
      ユーザー vimrc: "$HOME/.vimrc"
   第2ユーザー vimrc: "~/.vim/vimrc"
       ユーザー exrc: "$HOME/.exrc"
     システム gvimrc: "$VIM/gvimrc"
     ユーザー gvimrc: "$HOME/.gvimrc"
  第2ユーザー gvimrc: "~/.vim/gvimrc"
  デフォルトファイル: "$VIMRUNTIME/defaults.vim"
    システムメニュー: "$VIMRUNTIME/menu.vim"
       省略時の $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
コンパイル: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O2 -arch x86_64 -arch arm64 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wshadow -Werror -Wno-error=missing-field-initializers -Wno-error=deprecated-declarations -Wno-error=unused-function
リンク: clang -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/[email protected]/lib -L/usr/local/opt/readline/lib -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/[email protected]/lib -L/usr/local/opt/readline/lib -arch x86_64 -arch arm64 -L/usr/local/lib -o Vim -lm -lncurses -liconv /usr/local/lib/libintl.a -framework AppKit -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE
  • :checkhealth or :CheckHealth result(neovim only):

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

if &compatible
  set nocompatible
endif

set runtimepath+=~/.cache/dein/repos/github.com/vim-denops/denops.vim
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/ddu.vim
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/ddu-ui-filer
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/ddu-source-file

call ddu#custom#patch_global({
      \   'ui': 'filer',
      \   'sources': [{'name':'file', 'params':{}}],
      \   'uiParams': {
      \     'filer': {
      \       'split': 'vertical',
      \       'splitDirection': 'topleft',
      \       'winWidth': 5,
      \     },
      \   },
      \ })

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

:call ddu#start({})

Screenshot (if possible)

image

`resume` dose not work If exists expanded directory

Problems summary

When resume in ddu-options is set to v:true, ddu does not reuse the previous state if there is an expanded directory.

This occurs in both vim and neovim.

Expected

Reuse the previous state.

Environment Information

All plugin I'm using is the latest version.

  • deno version(deno -V output) deno 1.23.3
  • 0S: MacOS Monterey 12.4
  • version output
vim
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jun 28 2022 12:44:46)
macOS 版 - arm64
Compiled by Homebrew
Huge 版 without GUI.  機能の一覧 有効(+)/無効(-)
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     +perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby              +wildignore
+cursorbind        +lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        -mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary
-farsi             -mouse_sysmouse    -tag_old_static
      システム vimrc: "$VIM/vimrc"
      ユーザー vimrc: "$HOME/.vimrc"
   第2ユーザー vimrc: "~/.vim/vimrc"
       ユーザー exrc: "$HOME/.exrc"
  デフォルトファイル: "$VIMRUNTIME/defaults.vim"
       省略時の $VIM: "/opt/homebrew/share/vim"
コンパイル: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
リンク: clang -L. -fstack-protector-strong -L/opt/homebrew/lib -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/opt/readline/lib -o vim -lm -lncurses -liconv -lintl -framework AppKit -L/opt/homebrew/opt/lua/lib -llua5.4 -mmacosx-version-min=12.0 -fstack-protector-strong -L/opt/homebrew/Cellar/perl/5.34.0/lib/perl5/5.34.0/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin -lpython3.10 -framework CoreFoundation -lruby.3.1 -L/opt/homebrew/Cellar/ruby/3.1.2/lib
neovim
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

      システム vimrc: "$VIM/sysinit.vim"
       省略時の $VIM: "/opt/homebrew/Cellar/neovim/0.7.2/share/nvim"

Run :checkhealth for more info

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

if !has("nvim")
  set nocompatible
  filetype plugin indent on
  syntax enable
endif

let s:plugins = [
      \ 'vim-denops/denops.vim',
      \ 'Shougo/ddu.vim',
      \ 'Shougo/ddu-ui-filer',
      \ 'Shougo/ddu-column-filename',
      \ 'Shougo/ddu-source-file',
      \ 'Shougo/ddu-kind-file',
      \ ]

for item in s:plugins
  execute 'set runtimepath+=~/.cache/dein/repos/github.com/' . item
endfor

call ddu#custom#patch_global({
    \   'ui': 'filer',
    \   'sources': [{'name': 'file', 'params': {}}],
    \   'resume': v:true,
    \   'sourceOptions': {
    \     '_': {
    \       'columns': ['filename'],
    \     },
    \   },
    \   'kindOptions': {
    \     'file': {
    \       'defaultAction': 'open',
    \     },
    \   }
    \ })

autocmd FileType ddu-filer call s:ddu_my_settings()
function! s:ddu_my_settings() abort
  nnoremap <buffer><expr><silent><CR> ddu#ui#filer#is_directory()
    \ ? "<Cmd>call ddu#ui#filer#do_action('expandItem', {'mode': 'toggle'})<CR>"
    \ : "<Cmd>call ddu#ui#filer#do_action('itemAction')<CR>"
  nnoremap <buffer><silent> q <Cmd>call ddu#ui#filer#do_action('quit')<CR>
endfunction

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

  1. call ddu#start({})
  2. on a directory, push<CR> to expand the directory.
  3. push q to exit ddu
  4. call `ddu#start({})

then, you will see that the previous state (expanded directory and cursor position) is not restored.

Canceling the entry of a file name by <c-c> will result in an error.

Problems summary

Canceling a file name entry with <C-c> causes an error.

Expected

No error occurs when canceling file name entry.

Environment Information

  • ddu-ui-filer version (SHA1):10f5fa8d4268847e4fa5f865549443b2e2e802a8

  • denops.vim version (SHA1):a40e0c10be0c67b5fd6cb9713914b9259dafa7e2

  • deno version(deno -V output): deno 1.24.1

  • OS: Mac

  • neovim/Vim :version output:

NVIM v0.8.0-dev-2225-gb8dcbcc73
Build type: Release
LuaJIT 2.1.0-beta3

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

~/.config/nvim/init.lua

vim.cmd('syntax off')
vim.cmd('filetype off')
vim.cmd('filetype plugin indent off')

local cache_dir = vim.env.HOME .. '/.cache'
local dein_dir = cache_dir .. '/dein'
local dein_repo_dir = dein_dir .. '/repos/github.com/Shougo/dein.vim'

if not string.match(vim.o.runtimepath, '/dein.vim') then
	if vim.fn.isdirectory(dein_repo_dir) ~= 1 then
		os.execute('git clone https://github.com/Shougo/dein.vim ' .. dein_repo_dir)
	end
	vim.o.runtimepath = dein_repo_dir .. ',' .. vim.o.runtimepath 
end

if vim.call('dein#min#load_state', dein_dir) ~= 1 then
    return
end

vim.call('dein#begin', dein_dir)

vim.call('dein#add', 'vim-denops/denops.vim')
vim.call('dein#add', 'Shougo/ddu.vim')
vim.call('dein#add', 'Shougo/ddu-commands.vim')
vim.call('dein#add', 'Shougo/ddu-ui-filer')
vim.call('dein#add', 'Shougo/ddu-kind-file')
vim.call('dein#add', 'Shougo/ddu-source-file')
vim.call('dein#add', 'Shougo/ddu-column-filename')

vim.call('dein#end')
vim.call('dein#save_state')

vim.call('ddu#custom#patch_global',
  'uiOptions', {filer = {
    toggle = true,
  }})

vim.call('ddu#custom#patch_global',
  'uiParams', {filer = {
    split ='no',
    toggle = true,
  }})

function ddu_filer_my_settings()
  vim.keymap.set('n', 'n', "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'newFile'})<CR>", { noremap = true, buffer = true })
end

local ddu_filer_groupname = 'ddu-filer-group'
vim.api.nvim_create_augroup(ddu_filer_groupname, { clear = true })
vim.api.nvim_create_autocmd('FileType', {
  group = ddu_filer_groupname,
  pattern = 'ddu-filer',
  callback = ddu_filer_my_settings
})

vim.keymap.set('n', 'e', '<cmd>Ddu -ui=filer -source-option-columns=filename file<CR>', {})

vim.cmd('syntax on')
vim.cmd('filetype on')
vim.cmd('filetype plugin indent on')

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

  1. Start Neovim.
  2. Run call dein#update() command.
  3. Restart Neovim.
  4. Press the 'e' key.
  5. Press the 'n' key.
  6. Press the <C-c> key.

Screenshot (if possible)

スクリーンショット 2022-08-03 23 17 01

epanded tree are all collapsed when `updateOptions` is fired

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

Problems summary

SSIA

Expected

after redraw, the tree is saved.

Environment Information

  • ddu-ui-filer version (SHA1):
    dba7524
  • denops.vim version (SHA1):
    83f167b
  • deno version(deno -V output):
    deno 1.38.5
  • OS:
    WSL2: Ubuntu 22.04.3
  • neovim/Vim :version output:
    NVIM v0.10.0-dev-1846+gf31f260f0
    Build type: RelWithDebInfo
    LuaJIT 2.1.1702233742

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

set rtp+=~/.cache/dein/nvim/repos/github.com/vim-denops/denops.vim

set rtp+=~/.cache/dein/nvim/repos/github.com/Shougo/ddu.vim
set rtp+=~/.cache/dein/nvim/repos/github.com/Shougo/ddu-ui-filer
set rtp+=~/.cache/dein/nvim/repos/github.com/Shougo/ddu-source-file
set rtp+=~/.cache/dein/nvim/repos/github.com/Shougo/ddu-kind-file

nnoremap [ddu] <Nop>
nmap <Space>u [ddu]
nmap <silent> [ddu]F <Cmd>call ddu#start({
			\ 'ui': 'filer',
			\ 'sources': [{'name': 'file', 'params': {}}],
			\ })<CR>

autocmd FileType ddu-filer call s:ddu_filer_my_settings()

function s:ddu_filer_my_settings() abort
	nnoremap <buffer><silent> u
				\ <Cmd>call ddu#ui#filer#do_action('updateOptions', #{
				\	uiParams: #{ 
				\		filer: #{
				\			displayRoot: v:false
				\		}
				\	}
				\ })<CR>
	nnoremap <buffer> e
				\ <Cmd>call ddu#ui#do_action('expandItem', {'mode': 'toggle'})<CR>
	nnoremap <buffer> q
				\ <Cmd>call ddu#ui#filer#do_action('quit')<CR>
endfunction

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

  1. type <Space> u F to start ddu
  2. type e to expand each item
  3. type u to fire updateOptions action
  4. now the item expnaded in 2 is collapsed...

Screenshot (if possible)

hoge

Upload the log messages by :redir and :message (if errored)

Search only at initialization

Problems summary

Since searchItem is executed every redraw , cursor moves even when executing toggleSelectItem etc.

Expected

Keep cursor at position where the action was executed (search only at ddu starting (even with resume option)).

Environment Information

  • ddu-ui-filer version (SHA1):

331b70ab12de5395e5d64630186020de24277c88

  • denops.vim version (SHA1):

6578820fb79b1ae45e0dd448fd96dd6deb2f7be0

  • deno version(deno -V output):

deno 1.28.3

  • OS:

macOS 12.6.2

  • neovim/Vim :version output:
NVIM v0.8.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Features: +acl +iconv +tui

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

set runtimepath+=path/to/denops.vim
set runtimepath+=path/to/ddu.vim
set runtimepath+=path/to/ddu-ui-filer
set runtimepath+=path/to/ddu-column-filename
set runtimepath+=path/to/ddu-source-file
set runtimepath+=path/to/ddu-kind-file

nnoremap <silent> <space>e <Cmd>call ddu#start({
      \   'ui': 'filer',
      \   'sync': v:true,
      \   'sources': [{
      \     'name': 'file',
      \     'options': {
      \       'path': getcwd(),
      \       'columns': ['filename'],
      \     },
      \   }],
      \   'uiParams': {
      \     'filer': {
      \       'search': 'abspath/to/a/file'
      \     },
      \   },
      \ })<CR>

nnoremap <silent> <space>x <Cmd>call ddu#ui#filer#do_action('toggleSelectItem')<CR>

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

  1. (prepare) create multiple files at your workspace
  2. Open ddu filer with search uiParams with a file ( <space>e )
  3. Execute toggleSelectItem to other file ( <space>x )

Screenshot (if possible)

When select LICENSE cursor was moved to search path item ( README.md ).

Screen Shot 2023-01-10 at 13 11 10

Upload the log messages by :redir and :message (if errored)

If I run the action on the top 'file', I get an error.

Problems summary

If I run the action on the top 'file', I get an error.

Expected

The text at the top should represent the current directory and should operate like any other directory.

Environment Information

  • ddu-ui-filer version (SHA1):10f5fa8d4268847e4fa5f865549443b2e2e802a8

  • denops.vim version (SHA1):a40e0c10be0c67b5fd6cb9713914b9259dafa7e2

  • deno version(deno -V output): deno 1.24.1

  • OS: Mac

  • neovim/Vim :version output:

NVIM v0.8.0-dev-2225-gb8dcbcc73
Build type: Release
LuaJIT 2.1.0-beta3

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

~/.config/nvim/init.lua

vim.cmd('syntax off')
vim.cmd('filetype off')
vim.cmd('filetype plugin indent off')

local cache_dir = vim.env.HOME .. '/.cache'
local dein_dir = cache_dir .. '/dein'
local dein_repo_dir = dein_dir .. '/repos/github.com/Shougo/dein.vim'

if not string.match(vim.o.runtimepath, '/dein.vim') then
	if vim.fn.isdirectory(dein_repo_dir) ~= 1 then
		os.execute('git clone https://github.com/Shougo/dein.vim ' .. dein_repo_dir)
	end
	vim.o.runtimepath = dein_repo_dir .. ',' .. vim.o.runtimepath 
end

if vim.call('dein#min#load_state', dein_dir) ~= 1 then
    return
end

vim.call('dein#begin', dein_dir)

vim.call('dein#add', 'vim-denops/denops.vim')
vim.call('dein#add', 'Shougo/ddu.vim')
vim.call('dein#add', 'Shougo/ddu-commands.vim')
vim.call('dein#add', 'Shougo/ddu-ui-filer')
vim.call('dein#add', 'Shougo/ddu-kind-file')
vim.call('dein#add', 'Shougo/ddu-source-file')
vim.call('dein#add', 'Shougo/ddu-column-filename')

vim.call('dein#end')
vim.call('dein#save_state')

vim.call('ddu#custom#patch_global',
  'uiOptions', {filer = {
    toggle = true,
  }})

vim.call('ddu#custom#patch_global',
  'uiParams', {filer = {
    split ='no',
    toggle = true,
  }})

function ddu_filer_my_settings()
  vim.keymap.set('n', 'o', function()
    if vim.api.nvim_eval('ddu#ui#filer#is_directory()') then
      return "<Cmd>call ddu#ui#filer#do_action('expandItem', {'mode': 'toggle'})<CR>"
    else
      return "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'open'})<CR>"
    end
  end, { buffer = true, expr = true })
end

local ddu_filer_groupname = 'ddu-filer-group'
vim.api.nvim_create_augroup(ddu_filer_groupname, { clear = true })
vim.api.nvim_create_autocmd('FileType', {
  group = ddu_filer_groupname,
  pattern = 'ddu-filer',
  callback = ddu_filer_my_settings
})

vim.keymap.set('n', 'e', '<cmd>Ddu -ui=filer -source-option-columns=filename file<CR>', {})

vim.cmd('syntax on')
vim.cmd('filetype on')
vim.cmd('filetype plugin indent on')

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

  1. Start Neovim.
  2. Run call dein#update() command.
  3. Restart Neovim.
  4. Press the 'e' key.
  5. Press the 'o' key on the top item of the 'ddu-ui-filer' displayed.
  6. After that, 'ddu-ui-filer' will be inoperable.

Screenshot (if possible)

スクリーンショット 2022-08-03 20 34 52

The action "narrow" does not change the source path

Problems summary

The action "narrow" on the selected item does not change the source path. I confirmed that at the line 307 of denops/@ddu-kinds/file.ts changed the variable args.sourceOption.path is modified by the "narrow" action. I also checked another trial by giving .. to a key path of the params dictionary, but it neither did not change the source path to the parent directory. Thanks in advance.

Expected

The source path is narrowed to a selected item.

Environment Information

  • ddu-ui-filer version (SHA1): e27f84a

  • denops.vim version (SHA1): bfcecc3fffa49620ff8ce77a671ed086977b4c31

  • deno version(deno -V output): deno 1.40.2

  • OS: macOS Ventura 13.6.3

  • neovim/Vim :version output:

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jan  4 2024 03:08:50)
macOS 版 - x86_64
Compiled by GitHub Actions
Huge 版 with MacVim GUI.  機能の一覧 有効(+)/無効(-)
+acl                +clientserver       +diff               +folding            +lambda             +mouseshape         +netbeans_intg      +python3/dyn-stable +statusline         +textprop           +visualextra        -xterm_clipboard
+arabic             +clipboard          +digraphs           -footer             +langmap            +mouse_dec          +num64              +quickfix           -sun_workshop       +timers             +vreplace           -xterm_save
+autocmd            +cmdline_compl      +dnd                +fork()             +libcall            -mouse_gpm          +odbeditor          +reltime            +syntax             +title              +wildignore
+autochdir          +cmdline_hist       -ebcdic             +fullscreen         +linebreak          -mouse_jsbterm      +packages           +rightleft          +tag_binary         +toolbar            +wildmenu
-autoservername     +cmdline_info       +emacs_tags         +gettext            +lispindent         +mouse_netterm      +path_extra         +ruby/dyn           -tag_old_static     +transparency       +windows
+balloon_eval       +comments           +eval               -hangul_input       +listcmds           +mouse_sgr          +perl/dyn           +scrollbind         -tag_any_white      +user_commands      +writebackup
+balloon_eval_term  +conceal            +ex_extra           +iconv              +localmap           -mouse_sysmouse     +persistent_undo    +signs              -tcl                +vartabs            -X11
+browse             +cryptv             +extra_search       +insert_expand      +lua/dyn            +mouse_urxvt        +popupwin           +smartindent        +termguicolors      +vertsplit          -xattr
++builtin_terms     +cscope             -farsi              +ipv6               +menu               +mouse_xterm        +postscript         +sodium             +terminal           +vim9script         -xfontset
+byte_offset        +cursorbind         +file_in_path       +job                +mksession          +multi_byte         +printer            +sound              +terminfo           +viminfo            +xim
+channel            +cursorshape        +find_in_path       +jumplist           +modify_fname       +multi_lang         +profile            +spell              +termresponse       +virtualedit        -xpm
+cindent            +dialog_con_gui     +float              +keymap             +mouse              -mzscheme           +python/dyn         +startuptime        +textobjects        +visual             -xsmp
      システム vimrc: "$VIM/vimrc"
      ユーザー vimrc: "$HOME/.vimrc"
   第2ユーザー vimrc: "~/.vim/vimrc"
       ユーザー exrc: "$HOME/.exrc"
     システム gvimrc: "$VIM/gvimrc"
     ユーザー gvimrc: "$HOME/.gvimrc"
  第2ユーザー gvimrc: "~/.vim/gvimrc"
  デフォルトファイル: "$VIMRUNTIME/defaults.vim"
    システムメニュー: "$VIMRUNTIME/menu.vim"
       省略時の $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
コンパイル: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O3 -flto -arch x86_64 -arch arm64 -I/usr/local/Cellar/libsodium/1.0.19/include -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOUR
CE=1 -Wall -Wextra -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Werror -Wno-deprecated-declarations -Wno-error=missing-field-initializers -Wno-error=deprecated-declarations -Wno-error=unused-function
リンク: clang -arch x86_64 -arch arm64 -L/usr/local/lib -flto -o Vim -lm -lncurses /usr/local/lib/libsodium.a -liconv /usr/local/lib/libintl.a -framework AppKit

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

.vimrc

set nocompatible

set runtimepath^=~/.cache/dpp/repos/github.com/vim-denops/denops.vim/
set runtimepath^=~/.cache/dpp/repos/github.com/Shougo/ddu.vim/
set runtimepath^=~/.cache/dpp/repos/github.com/Shougo/ddu-ui-filer/
set runtimepath^=~/.cache/dpp/repos/github.com/Shougo/ddu-kind-file/
set runtimepath^=~/.cache/dpp/repos/github.com/Shougo/ddu-source-file/
set runtimepath^=~/.cache/dpp/repos/github.com/Shougo/ddu-column-filename/

if has('syntax')
    syntax on
endif

call ddu#custom#patch_global({
        \       "ui": "filer",
        \       "sources": ["file"],
        \       "sourceOptions": {
        \           "file": {
        \               "columns": ["filename"],
        \           },
        \       },
        \ })

function s:ddu_filer_settings() abort
        nnoremap <buffer><silent><expr> <CR>
                \ ddu#ui#get_item()->get('isTree', v:false) ?
                \ "<Cmd>call ddu#ui#do_action('itemAction', { 'name': 'narrow' })<CR>" :
                \ "<Cmd>call ddu#ui#do_action('itemAction', { 'name': 'open' })<CR>"
endfunction

autocmd FileType ddu-filer call s:ddu_filer_settings()

command! DduFiler call ddu#start()

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

  1. vim
  2. :DduFiler
  3. 2j
  4. <CR>

Screenshot (if possible)

Before calling the action "narrow" on the child_directory/

before_narrow

After calling the action

after_narrow

[Question] How can I set it up with 'patch_local'?

I have set up a ddu-ui-filer with your configuration as a reference.

Ddu -name=tree -resume -source-option-path=`getcwd()` -source-option-columns=filename

call ddu#custom#patch_local('tree', {
    \   'ui': 'filer',
    \   'sources': [
    \     {'name': 'file'}
    \   ],
    \ })

But the argument is too long, I want to set it with ddu#custom#patch_local.
I could set ui and sources with ddu#custom#patch_local, but the following items cannot be set with ddu#custom#patch_local.

  1. -source-option-path
  2. -source-option-columns
  3. -resume

How can I set them?

Unintended window shrinkage when opening the filer vertically in certain window layouts

Problems summary

When the window is split horizontally once and the lower half of the window is split vertically, and the filer is opened with vertical and topleft, the column of the lower left window is extremely narrow and does not return after the filer is closed.

Expected

The window width does not narrow drastically when the filer is opened as in other layouts, and returns to the original window width when the filer is closed.

Environment Information

  • ddu-ui-filer version (SHA1): e27f84a

  • denops.vim version (SHA1): ebda886

  • deno version(deno -V output): deno 1.40.5

  • OS: macOS Sonoma 14.2.1

  • neovim/Vim :version output:

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jan 23 2024 22:19:02)
macOS 版 - arm64
適用済パッチ: 1-50
Compiled by Homebrew
Huge 版 without GUI.  機能の一覧 有効(+)/無効(-)
+acl               -ebcdic            +lua               -python            +title
+arabic            +emacs_tags        +menu              +python3           -toolbar
+autocmd           +eval              +mksession         +quickfix          +user_commands
+autochdir         +ex_extra          +modify_fname      +reltime           +vartabs
-autoservername    +extra_search      +mouse             +rightleft         +vertsplit
-balloon_eval      -farsi             -mouseshape        +ruby              +vim9script
+balloon_eval_term +file_in_path      +mouse_dec         +scrollbind        +viminfo
-browse            +find_in_path      -mouse_gpm         +signs             +virtualedit
++builtin_terms    +float             -mouse_jsbterm     +smartindent       +visual
+byte_offset       +folding           +mouse_netterm     +sodium            +visualextra
+channel           -footer            +mouse_sgr         +sound             +vreplace
+cindent           +fork()            -mouse_sysmouse    +spell             +wildignore
-clientserver      +gettext           +mouse_urxvt       +startuptime       +wildmenu
+clipboard         -hangul_input      +mouse_xterm       +statusline        +windows
+cmdline_compl     +iconv             +multi_byte        -sun_workshop      +writebackup
+cmdline_hist      +insert_expand     +multi_lang        +syntax            -X11
+cmdline_info      +ipv6              -mzscheme          +tag_binary        -xattr
+comments          +job               +netbeans_intg     -tag_old_static    -xfontset
+conceal           +jumplist          +num64             -tag_any_white     -xim
+cryptv            +keymap            +packages          -tcl               -xpm
+cscope            +lambda            +path_extra        +termguicolors     -xsmp
+cursorbind        +langmap           +perl              +terminal          -xterm_clipboard
+cursorshape       +libcall           +persistent_undo   +terminfo          -xterm_save
+dialog_con        +linebreak         +popupwin          +termresponse
+diff              +lispindent        +postscript        +textobjects
+digraphs          +listcmds          +printer           +textprop
-dnd               +localmap          +profile           +timers
      システム vimrc: "$VIM/vimrc"
      ユーザー vimrc: "$HOME/.vimrc"
   第2ユーザー vimrc: "~/.vim/vimrc"
       ユーザー exrc: "$HOME/.exrc"
  デフォルトファイル: "$VIMRUNTIME/defaults.vim"
       省略時の $VIM: "/opt/homebrew/share/vim"
コンパイル: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -D_REENTRANT -U_
FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
リンク: clang -o vim -lm -lncurses -lsodium -liconv -lintl -framework AppKit -L/opt/homebrew/opt/lu
a/lib -llua5.4 -mmacosx-version-min=14.2 -fstack-protector-strong -L/opt/homebrew/opt/perl/lib/perl
5/5.38/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/[email protected]/Frameworks/Python.fra
mework/Versions/3.12/lib/python3.12/config-3.12-darwin -lpython3.12 -framework CoreFoundation -lrub
y.3.3 -L/opt/homebrew/Cellar/ruby/3.3.0/lib
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

      システム vimrc: "$VIM/sysinit.vim"
       省略時の $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"

Run :checkhealth for more info

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

syntax enable
filetype plugin indent on
set rtp+=~/temp/nvim_minrc/20240220/denops.vim
set rtp+=~/temp/nvim_minrc/20240220/ddu.vim
set rtp+=~/temp/nvim_minrc/20240220/ddu-ui-filer
set rtp+=~/temp/nvim_minrc/20240220/ddu-source-file
set rtp+=~/temp/nvim_minrc/20240220/ddu-column-filename
set rtp+=~/temp/nvim_minrc/20240220/ddu-kind-file

call ddu#custom#patch_local('filer', {
\   'ui': 'filer',
\   'sources': [
\     {
\       'name': 'file',
\       'params': {},
\     },
\   ],
\   'sourceOptions': {
\     '_': {
\       'columns': ['filename'],
\     },
\   },
\   'kindOptions': {
\     'file': {
\       'defaultAction': 'open',
\     },
\   },
\   'uiParams': {
\     'filer': {
\       'winWidth': 40,
\       'split': 'vertical',
\       'splitDirection': 'topleft',
\     }
\   },
\ })

autocmd FileType ddu-filer call s:ddu_filer_my_settings()
function! s:ddu_filer_my_settings() abort
  nnoremap <buffer><silent> q
    \ <Cmd>call ddu#ui#do_action('quit')<CR>
endfunction

nmap <silent> ;d <Cmd>call ddu#start({
\   'name': 'filer',
\   'searchPath': expand('%:p'),
\ })<CR>

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

  1. vim
  2. :sp
  3. <C-w><C-w>
  4. :vsp
  5. ;d
  6. q

Screenshot (if possible)

スクリーンショット 2024-02-21 22 28 35
スクリーンショット 2024-02-21 22 29 41
スクリーンショット 2024-02-21 22 33 07

[Feature request] I want a method that is called when redrawing

The "getLength" method is called every time a directory is opened, and the "getText" method is called every time an item is drawn, but I would like a method to be run on first display and on "redraw".

The reason is that I created a plugin that displays the Git status in a "column", but since the "git status" command is executed within the "getLength" method, the process becomes redundant.

Environment Information

  • ddu-ui-filer version (SHA1): 94ad1d2

  • denops.vim version (SHA1): bcc88ca61f1edcbe364dbfb4967204193efc6e9a

  • deno version(deno -V output): deno 1.42.4

  • OS: Linux

  • neovim/Vim :version output: NVIM v0.10.0-dev-3023+g499070148

ddu-column-gitstatus

https://github.com/nabezokodaikon/ddu-column-gitstatus/blob/main/denops/%40ddu-columns/gitstatus.ts

Strange (unexpected) behavior If specify 'topleft' to splitDirection

Problems summary

If I specify splitDirection: 'topleft', several unexpected behaviors occur (please see reproduce section).

Expected

Works same as splitDirection: 'belowright'

Environment Information

  • ddu-ui-filer version (SHA1): 27b2ffe (latest)
  • denops.vim version (SHA1): ea7370bf5d323e83ee13ccba35f56e06db5753e1 (latest)
  • deno version(deno -V output):
deno 1.37.2 (release, aarch64-apple-darwin)
v8 11.8.172.13
typescript 5.2.2
  • OS: MacOS
  • neovim/Vim :version output:
NVIM v0.10.0-dev-1428+g7a5effb0f-Homebrew
Build type: Release
LuaJIT 2.1.1696795921

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

if !has("nvim")
  set nocompatible
  filetype plugin indent on
  syntax enable
endif

let s:plugins = [
      \ 'vim-denops/denops.vim',
      \ 'Shougo/ddu.vim',
      \ 'Shougo/ddu-ui-filer',
      \ 'ryota2357/ddu-column-icon_filename',
      \ 'Shougo/ddu-source-file',
      \ 'Shougo/ddu-kind-file',
      \ ]
for item in s:plugins
  execute 'set runtimepath+=~/.cache/dein/repos/github.com/' .. item
endfor

call ddu#custom#patch_global(#{
    \   ui: 'filer',
    \   sources: [{'name': 'file'}],
    \   sourceOptions: #{
    \     _: { 'columns': ['icon_filename'] }
    \   },
    \   uiOptions: #{
    \     _: #{ toggle: v:true }
    \   },
    \   uiParams: #{
    \     _: #{ splitDirection: 'topleft' }
    \   },
    \   kindOptions: #{
    \     file: #{
    \       defaultAction: 'open',
    \     },
    \   }
    \ })

autocmd FileType ddu-filer call s:ddu_my_settings()
function! s:ddu_my_settings() abort
  nnoremap <buffer><CR> <Cmd>call ddu#ui#sync_action('itemAction')<CR>
  nnoremap <buffer>o    <Cmd>call ddu#ui#async_action('itemAction', #{ params: #{ command: 'tab drop' } })<CR>
endfunction

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

toggle does not works.

  • :call ddu#start() then open filer.
  • :call ddu#start() to close filer.
  • You can see that the filer is not closed and the another buffer is closed.
2023-10-28.23.55.37.mov

open with tab drop

  • :call ddu#start() then open filer.
  • CR to open a.txt.
  • :call ddu#start() then re-open filer.
  • o to open b.txt with tab drop
  • You can see that a.txt is closed and the filer buffer is remained.
2023-10-29.0.01.16.mov

UpdateOptions are not reflected after moving the tree

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

Problems summary

Once the tree is moved, the option changes made by updateOptions are not reflected.
I only checked the matcher part, so it is possible that this is a different issue

Expected

The options should be changed regardless of whether the tree is moved or not.

Environment Information

  • ddu-ui-filer version (SHA1): 8f3e8c8669b25017cd0b44b4f401d8eb9af8e9ad

  • denops.vim version (SHA1): 68f607d93a9758d15c0d63d3268aa420ddd29edd

  • deno version(deno -V output):
    deno 1.37.1

  • OS:

PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

TODO: MacOS version

  • neovim/Vim :version output:
NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=auto -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_TS_HAS_SET_MAX_START_DEPTH -I/usr/include/luajit-2.1 -I/usr/include -I/build/neovim-8HEGtO/neovim-0.10.0~ubuntu1+git202309281605-28ffd96c9-9b397864c/.deps/usr/include -I/build/neovim-8HEGtO/neovim-0.10.0~ubuntu1+git202309281605-28ffd96c9-9b397864c/build/src/nvim/auto -I/build/neovim-8HEGtO/neovim-0.10.0~ubuntu1+git202309281605-28ffd96c9-9b397864c/build/include -I/build/neovim-8HEGtO/neovim-0.10.0~ubuntu1+git202309281605-28ffd96c9-9b397864c/build/cmake.config -I/build/neovim-8HEGtO/neovim-0.10.0~ubuntu1+git202309281605-28ffd96c9-9b397864c/src

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

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

" Your minimal init.vim/vimrc
set runtimepath+=~/.cache/dein/repos/github.com/vim-denops/denops.vim
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/ddu.vim
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/ddu-source-file
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/ddu-kind-file
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/ddu-ui-filer
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/ddu-filter-matcher_hidden
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/ddu-commands.vim

autocmd TabEnter,CursorHold,FocusGained <buffer>
      \ call ddu#ui#do_action('checkItems')
augroup DduFilerSettings
  autocmd!
  autocmd FileType ddu-filer call s:ddu_filer_settings()
augroup END

function! s:ddu_filer_settings() abort
  nnoremap <buffer> h
        \ <Cmd>call ddu#ui#do_action('itemAction',
        \ #{ name: 'narrow', params: #{ path: '..' } })<CR>
  nnoremap <buffer> >
      \ <Cmd>call ddu#ui#do_action('updateOptions', #{
      \   sourceOptions: #{
      \     file: #{
      \       matchers: ToggleHidden('file'),
      \     },
      \   },
      \ })<CR>
  nnoremap <buffer><expr> l
        \ ddu#ui#get_item()->get('isTree', v:false) ?
        \ "<Cmd>call ddu#ui#do_action('itemAction', #{ name: 'narrow' })<CR>" :
        \ "<Cmd>call ddu#ui#do_action('itemAction', #{ name: 'open' })<CR>"
  nnoremap q <Cmd>call ddu#ui#filer#do_action('quit')<CR>
endfunction

function! ToggleHidden(name)
  let current = ddu#custom#get_current(b:ddu_ui_name)
  let source_options = get(current, 'sourceOptions', {})
  let source_options_name = get(source_options, a:name, {})
  let matchers = get(source_options_name, 'matchers', [])
  return empty(matchers) ? ['matcher_hidden'] : []
endfunction

call ddu#custom#patch_global({
      \   'ui': 'filer',
      \   'sources': [
      \     {
      \       'name': 'file',
      \       'params': {},
      \     },
      \   ],
      \   'sourceOptions': {
      \     'file': {
      \       'matchers': ['matcher_hidden'],
      \     },
      \   },
      \   'kindOptions': {
      \     'file': {
      \       'defaultAction': 'open',
      \     },
      \   },
      \   'actionOptions': {
      \     'narrow': {
      \       'quit': v:false 
      \     },
      \   },
      \   'uiOptions': {
      \     'filer': {
      \       'toggle': v:true 
      \     },
      \   },
      \   'uiParams': {
      \     'filer': {
      \       'split': 'floating',
      \       'sort': 'filename',
      \       'sortTreesFirst': v:true,
      \       'toggle': v:true,
      \     },
      \   },
      \ })

nnoremap ,n <Cmd>Ddu -name=filer<CR>

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

  1. ,n to start Ddu filer
  2. > to check that the mather is switched and mathcer_hidden and '' are swapped
  3. l or h to move tree
  4. h or l to return to original position (not always necessary)
  5. > to change matcher, but not changed

Screenshot (if possible)

Upload the log messages by :redir and :message (if errored)

Flickering when moving directories using narrow

Problems summary

Flickering may occur when moving directories using narrow. However, it may not occur depending on the terminal emulator used.

There is no functional problem, but it would be nice to know how to prevent it from happening.

Expected

No flicker occurs on either terminal emulator.

Environment Information

  • ddu-ui-filer version (SHA1): e7e05b9

  • denops.vim version (SHA1): 5736b667b40829ab21bedaf7d321de1cc71dbd7f

  • deno version(deno -V output): deno 1.29.1

  • OS: macOS 13.1 Apple M1 Pro

  • neovim/Vim :version output:

    NVIM v0.8.1
    Build type: Release
    LuaJIT 2.1.0-beta3
    Compiled by [email protected]
    
    Features: +acl +iconv +tui
    See ":help feature-compile"
    
       system vimrc file: "$VIM/sysinit.vim"
      fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.8.1/share/nvim"
    
    Run :checkhealth for more info
    

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

if exists('+compatible') && &compatible
  set nocompatible
endif

set runtimepath^=~/.cache/dein/repos/github.com/vim-denops/denops.vim"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu.vim"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-ui-filer"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-source-file"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-kind-file"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-column-filename"
set runtimepath^=~/.cache/dein/repos/github.com/Shougo/ddu-filter-matcher_substring"

filetype plugin indent on
syntax on

call ddu#custom#patch_global({
    \   'ui': 'filer',
    \   'uiParams': {
    \     'filer': {
    \       'splitDirection': 'topleft',
    \       'split': 'vertical',
    \       'winWidth': '25',
    \     },
    \   },
    \   'sourceOptions': {
    \     '_': {
    \       'matchers': ['matcher_substring'],
    \       'columns': ['filename'],
    \     },
    \   },
    \   'sources': [{'name': 'file', 'params': {}}],
    \ })

autocmd FileType ddu-filer call s:ddu_filer_settings()
function! s:ddu_filer_settings() abort
    nnoremap <buffer><silent><expr> <CR>
        \ ddu#ui#filer#is_tree() ?
        \ "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'narrow'})<CR>" :
        \ "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'open'})<CR>"
    nnoremap <buffer><silent> q
        \ <Cmd>call ddu#ui#filer#do_action('quit')<CR>
endfunction

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

  1. Start neovim with minimum init.vim e.g nvim -u init.vim
  2. call ddu#start()
  3. Move directories

Screenshot (if possible)

Flickering occurred

iTerm2
Build 3.4.18

ddu_ui_flicker_iterm2.mov

wezterm
20221119-145034-49b9839f

ddu_ui_flicker_wezterm.mov

Flickering NOT occurred

macOS's default Terminal.app

ddu_ui_flicker_teminalapp.mov

Upload the log messages by :redir and :message (if errored)

No errors.

`ddu-ui-filer-param-search` opens not-ancestor directories

Problems summary

Thank you very much for developing nice plugin.

When I passes expand('%:p') to ddu-ui-filer-param-search, it opens not-ancestor directories.

Please let me know how to open only ancestor directories.

Expected

directories

root/
  dir_a/
    hoge.txt
  parent/
    fuga.txt  <- I am opening this file

expected

file:
+ root/
 + dir_a/
 - parent2/
     fuga.txt

actual

file:
+ root/
 - dir_a/  <- not-ancestor directory opens
     hoge.txt
 - parent2/
     fuga.txt

Environment Information

  • ddu-ui-filer version (SHA1): 050b2c779e9fc4b22e113e570b50588c6a35432d

  • denops.vim version (SHA1): a40e0c10be0c67b5fd6cb9713914b9259dafa7e2

  • deno version(deno -V output): deno 1.22.0

  • OS: MacOS Monterey 12.4

  • neovim/Vim :version output:

neovim
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Features: +acl +iconv +tui
See ":help feature-compile"

      システム vimrc: "$VIM/sysinit.vim"
       省略時の $VIM: "/usr/local/Cellar/neovim/0.7.2/share/nvim"

Run :checkhealth for more info
Vim
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 19 2022 21:41:43)
macOS version - x86_64
Included patches: 1-4113
Compiled by [email protected]
Normal version without GUI.  Features included (+) or not (-):
+acl               +channel           +cscope            +ex_extra          -hangul_input      +linebreak         -mouse_dec         -mzscheme          -profile           -sodium            -tcl               +user_commands     +wildmenu
-arabic            +cindent           +cursorbind        +extra_search      +iconv             +lispindent        -mouse_gpm         +netbeans_intg     -python            -sound             -termguicolors     -vartabs           +windows
+autocmd           -clientserver      +cursorshape       -farsi             +insert_expand     +listcmds          -mouse_jsbterm     +num64             -python3           +spell             +terminal          +vertsplit         +writebackup
+autochdir         +clipboard         +dialog_con        +file_in_path      +ipv6              +localmap          -mouse_netterm     +packages          +quickfix          +startuptime       +terminfo          +vim9script        -X11
-autoservername    +cmdline_compl     +diff              +find_in_path      +job               -lua               +mouse_sgr         +path_extra        +reltime           +statusline        +termresponse      +viminfo           -xfontset
-balloon_eval      +cmdline_hist      +digraphs          +float             +jumplist          +menu              -mouse_sysmouse    -perl              -rightleft         -sun_workshop      +textobjects       +virtualedit       -xim
-balloon_eval_term +cmdline_info      -dnd               +folding           -keymap            +mksession         -mouse_urxvt       +persistent_undo   +ruby/dyn          +syntax            +textprop          +visual            -xpm
-browse            +comments          -ebcdic            -footer            +lambda            +modify_fname      +mouse_xterm       +popupwin          +scrollbind        +tag_binary        +timers            +visualextra       -xsmp
+builtin_terms     -conceal           -emacs_tags        +fork()            -langmap           +mouse             +multi_byte        +postscript        +signs             -tag_old_static    +title             +vreplace          -xterm_clipboard
+byte_offset       +cryptv            +eval              -gettext           +libcall           -mouseshape        +multi_lang        +printer           +smartindent       -tag_any_white     -toolbar           +wildignore        -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework Coco

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

call plug#begin(stdpath('data') . '/plugged')
Plug 'vim-denops/denops.vim'
Plug 'Shougo/ddu.vim'
Plug 'Shougo/ddu-ui-ff'
Plug 'Shougo/ddu-ui-filer'
Plug 'Shougo/ddu-source-file'
Plug 'Shougo/ddu-kind-file'
Plug 'Shougo/ddu-column-filename'
call plug#end()

call ddu#custom#patch_local('filer', {
\   'ui': 'filer',
\   'sources': [
\     {
\       'name': 'file',
\       'params': {},
\     },
\   ],
\   'sourceOptions': {
\     '_': {
\       'columns': ['filename'],
\     },
\   },
\   'uiParams': {
\     'filer': {
\       'winWidth': 40,
\       'split': 'vertical',
\       'splitDirection': 'topleft',
\     }
\   },
\ })

autocmd FileType ddu-filer call s:ddu_filer_my_settings()
function! s:ddu_filer_my_settings() abort
  nnoremap <buffer><silent><expr> <CR>
    \ ddu#ui#filer#is_directory() ?
    \ "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'narrow'})<CR>" :
    \ "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'open', 'params': {'command': 'vsplit'}})<CR>"

  nnoremap <buffer><silent> q
    \ <Cmd>call ddu#ui#filer#do_action('quit')<CR>

  nnoremap <buffer><silent> ..
    \ <Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'narrow', 'params': {'path': '..'}})<CR>
endfunction

nmap <silent> ;d <Cmd>call ddu#start({
\   'name': 'filer',
\   'uiParams': {'filer': {'search': expand('%:p')}},
\ })<CR>

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

  1. Open a file under some directories by neovim
  2. Open ddu-ui-filer by pressing ;d

Screenshot (if possible)

スクリーンショット 2022-08-03 14 49 52

preview window doesn't redraw in `redraw` action

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

Problems summary

SSIA

Expected

ddu window and preview window are both updated and redraw.

Environment Information

  • ddu-ui-filer version (SHA1):
    ee7b69d
  • denops.vim version (SHA1):
    16d4bbc
  • deno version(deno -V output):
    deno 1.38.5
  • OS:
    WSL2 Ubuntu 22.04.3
  • neovim/Vim :version output:
    NVIM v0.10.0-dev-1846+gf31f260f0
    Build type: RelWithDebInfo
    LuaJIT 2.1.1702233742

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

vim.opt.rtp:append("~/.cache/dein/nvim/repos/github.com/vim-denops/denops.vim")
vim.opt.rtp:append("~/.cache/dein/nvim/repos/github.com/Shougo/ddu.vim")
vim.opt.rtp:append("~/.cache/dein/nvim/repos/github.com/Shougo/ddu-ui-filer")
vim.opt.rtp:append("~/.cache/dein/nvim/repos/github.com/Shougo/ddu-source-file")
vim.opt.rtp:append("~/.cache/dein/nvim/repos/github.com/Shougo/ddu-kind-file")

local function set_filer_layout()
	vim.fn["ddu#custom#patch_local"]("default", {
		uiParams = {
			filer = {
				split = "floating",
				winRow = 1,
				winCol = 1,
				winWidth = "&columns / 2",
				winHeight = "&lines",
				previewFloating = true,
				previewRow = 1,
				previewCol = "&columns / 2",
				previewWidth = "&columns / 2",
				previewHeight = "&lines",
			}
		}
	})
end

set_filer_layout()

local function update_ui_layout()
	local currentOptions = vim.fn["ddu#custom#get_current"]()
	if vim.tbl_isempty(currentOptions) then
		return
	end
	local updatedLocalOptions = vim.fn["ddu#custom#get_local"]()
	if vim.tbl_isempty(updatedLocalOptions) then
		return
	end
	vim.fn["ddu#ui#do_action"]('updateOptions', updatedLocalOptions[currentOptions["name"]])
	vim.fn["ddu#ui#do_action"]('redraw', { method = "uiRedraw" })
end

vim.api.nvim_create_autocmd("VimResized", {
	pattern = "*",
	callback = function()
		set_filer_layout()
		update_ui_layout()
	end
})

vim.keymap.set('n', '<Space>e', function ()
	vim.fn["ddu#start"]({
		ui = "filer",
		sources = { "file" }
	})
end)

vim.api.nvim_create_autocmd("FileType", {
	pattern = "ddu-filer",
	callback = function()
		vim.keymap.set('n', 'p', function ()
			vim.fn["ddu#ui#do_action"]('preview')
		end)
		vim.keymap.set('n', 'q', function ()
			vim.fn["ddu#ui#do_action"]('quit')
		end)
	end
})

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

  1. type <Space> e to start ddu
  2. type p on ddu window to start preview
  3. change the vim window size to fire VimResized autocmd
  4. the preview window size does not changed...

Screenshot (if possible)

hoge

Upload the log messages by :redir and :message (if errored)

multi_actions(['expandItem', 'cursorNext']) seems not to execute in order.

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

Problems summary

It is intended to sequentially perform directory expansion and cursor movement by using multi_actions(['expandItem', 'cursorNext']), aiming to position the cursor at the first item in the expanded directory.
However, after this operation is performed, the cursor is found to be on the element next to the directory before its expansion, seems like cursor moved first and then the directory expanded afterwards.

Expected

The directory expands, and the cursor points to the next element of the expanded directory.

Environment Information

  • ddu-ui-filer version (SHA1): from c881d72 to latest(0697375)

  • denops.vim version (SHA1): `2a393849

  • deno version(deno -V output): deno 1.43.1

  • OS: Arch Linux

  • neovim/Vim :version output:

NVIM v0.10.0-dev-2961+g4d52b0cf6
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068

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

set runtimepath+=~/gomi/denops.vim
set runtimepath+=~/gomi/ddu.vim
set runtimepath+=~/gomi/ddu-ui-filer
set runtimepath+=~/gomi/ddu-source-file
nnoremap <silent> <Space>e <Cmd>call ddu#start(#{
      \   ui: 'filer',
      \   sources: [#{name:'file'}],
      \ })<CR>
nnoremap o <Cmd>call ddu#ui#multi_actions(['expandItem', 'cursorNext'])<CR>
nnoremap q <Cmd>call ddu#ui#do_action('quit')<CR>

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

  1. <space>e
  2. select some dir
  3. o

Screenshot (if possible)

Upload the log messages by :redir and :message (if errored)

After narrow, ddu-column-filename does not refrect

Problems summary

After opening a directory by itemAction narrow, ddu-column-filename (such as + prefix) does not reflect.

Expected

directories

~/
 dir_a/  <- narrow here
  dir_b/
   hoge.txt

expected

file:~/dir_a
+ dir_b/
   hoge.txt

actual

file:~/dir_a
dir_b/
hoge.txt

Please see the screenshots.

Environment Information

  • ddu-ui-filer version (SHA1): 10f5fa8d4268847e4fa5f865549443b2e2e802a8

  • denops.vim version (SHA1): a40e0c10be0c67b5fd6cb9713914b9259dafa7e2

  • deno version(deno -V output): deno 1.22.0

  • OS: MacOS Monterey 12.4

  • neovim/Vim :version output:

neovim
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Features: +acl +iconv +tui
See ":help feature-compile"

      システム vimrc: "$VIM/sysinit.vim"
       省略時の $VIM: "/usr/local/Cellar/neovim/0.7.2/share/nvim"

Run :checkhealth for more info
Vim
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 19 2022 21:41:43)
macOS version - x86_64
Included patches: 1-4113
Compiled by [email protected]
Normal version without GUI.  Features included (+) or not (-):
+acl               +channel           +cscope            +ex_extra          -hangul_input      +linebreak         -mouse_dec         -mzscheme          -profile           -sodium            -tcl               +user_commands     +wildmenu
-arabic            +cindent           +cursorbind        +extra_search      +iconv             +lispindent        -mouse_gpm         +netbeans_intg     -python            -sound             -termguicolors     -vartabs           +windows
+autocmd           -clientserver      +cursorshape       -farsi             +insert_expand     +listcmds          -mouse_jsbterm     +num64             -python3           +spell             +terminal          +vertsplit         +writebackup
+autochdir         +clipboard         +dialog_con        +file_in_path      +ipv6              +localmap          -mouse_netterm     +packages          +quickfix          +startuptime       +terminfo          +vim9script        -X11
-autoservername    +cmdline_compl     +diff              +find_in_path      +job               -lua               +mouse_sgr         +path_extra        +reltime           +statusline        +termresponse      +viminfo           -xfontset
-balloon_eval      +cmdline_hist      +digraphs          +float             +jumplist          +menu              -mouse_sysmouse    -perl              -rightleft         -sun_workshop      +textobjects       +virtualedit       -xim
-balloon_eval_term +cmdline_info      -dnd               +folding           -keymap            +mksession         -mouse_urxvt       +persistent_undo   +ruby/dyn          +syntax            +textprop          +visual            -xpm
-browse            +comments          -ebcdic            -footer            +lambda            +modify_fname      +mouse_xterm       +popupwin          +scrollbind        +tag_binary        +timers            +visualextra       -xsmp
+builtin_terms     -conceal           -emacs_tags        +fork()            -langmap           +mouse             +multi_byte        +postscript        +signs             -tag_old_static    +title             +vreplace          -xterm_clipboard
+byte_offset       +cryptv            +eval              -gettext           +libcall           -mouseshape        +multi_lang        +printer           +smartindent       -tag_any_white     -toolbar           +wildignore        -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework Coco

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

call plug#begin(stdpath('data') . '/plugged')
Plug 'vim-denops/denops.vim'
Plug 'Shougo/ddu.vim'
Plug 'Shougo/ddu-ui-ff'
Plug 'Shougo/ddu-ui-filer'
Plug 'Shougo/ddu-source-file'
Plug 'Shougo/ddu-kind-file'
Plug 'Shougo/ddu-column-filename'
call plug#end()

call ddu#custom#patch_local('filer', {
\   'ui': 'filer',
\   'sources': [
\     {
\       'name': 'file',
\       'params': {},
\     },
\   ],
\   'sourceOptions': {
\     '_': {
\       'columns': ['filename'],
\     },
\   },
\   'uiParams': {
\     'filer': {
\       'winWidth': 40,
\       'split': 'vertical',
\       'splitDirection': 'topleft',
\     }
\   },
\ })

autocmd FileType ddu-filer call s:ddu_filer_my_settings()
function! s:ddu_filer_my_settings() abort
  nnoremap <buffer><silent><expr> <CR>
    \ ddu#ui#filer#is_directory() ?
    \ "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'narrow'})<CR>" :
    \ "<Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'open', 'params': {'command': 'vsplit'}})<CR>"

  nnoremap <buffer><silent> q
    \ <Cmd>call ddu#ui#filer#do_action('quit')<CR>

  nnoremap <buffer><silent> ..
    \ <Cmd>call ddu#ui#filer#do_action('itemAction', {'name': 'narrow', 'params': {'path': '..'}})<CR>
endfunction

nmap <silent> ;d <Cmd>call ddu#start({
\   'name': 'filer',
\ })<CR>

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

  1. Open a file under some directories by neovim
  2. Open ddu-ui-filer by pressing ;d
  3. Press Enter on the any directory(narrow)

Screenshot (if possible)

Before narrow

スクリーンショット 2022-08-04 8 32 36

After narrow

スクリーンショット 2022-08-04 8 32 55

When 'split' is set to 'no', new buffer was created after quitted

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

Problems summary

When split option is set to 'no', after I quitted ddu, new "No Name" buffer was created.

Expected

"No Name" buffer is not created.

Environment Information

  • ddu-ui-filer version (SHA1): 61c76a1

  • denops.vim version (SHA1): 8f3899de3d3add07105221262dca90a31c4c2d4c

  • deno version(deno -V output): deno 1.32.2

  • OS: Mac

  • neovim/Vim :version output:

NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3

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

" Your minimal init.vim/vimrc
set runtimepath+=~/path/to/denops.vim
set runtimepath+=~/path/to/ddu.vim
set runtimepath+=~/path/to/ddu-source-file
set runtimepath+=~/path/to/ddu-ui-filer

nnoremap <space>e <Cmd>call ddu#start({
      \   'ui': 'filer',
      \   'sources': [{ 'name': 'file', 'params': {} }],
      \   'uiParams': {
      \     'filer': {
      \       'split': 'no',
      \     },
      \   },
      \ })<CR>

nnoremap <space>x <Cmd>call ddu#ui#filer#do_action('quit')<CR>

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

  1. Open "No Name" buffer
  2. Check buffer list (:ls)
:ls
  1 %a   "[No Name]"                    line 1
  1. Open ddu filer (<space>e)
  2. Close ddu filer (<space>x)
  3. Check buffer list again (:ls)
:ls
  1  h   "[No Name]"                    line 1
  3 %a   "[No Name]"                    line 1

Screenshot (if possible)

Upload the log messages by :redir and :message (if errored)

Items appear redundant when redrawn

Problems summary

Items appear redundant when redrawn.

Expected

Items are no longer redundant when redrawn.

Environment Information

  • ddu-ui-filer version (SHA1): 94ad1d2

  • denops.vim version (SHA1): bcc88ca61f1edcbe364dbfb4967204193efc6e9a

  • deno version(deno -V output): deno 1.42.4

  • OS: Linux

  • neovim/Vim :version output: NVIM v0.10.0-dev-3023+g499070148

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

init.lua

vim.opt.runtimepath:prepend('~/.cache/dpp/repos/github.com/vim-denops/denops.vim')
vim.opt.runtimepath:prepend('~/.cache/dpp/repos/github.com/Shougo/ddu.vim')
vim.opt.runtimepath:prepend('~/.cache/dpp/repos/github.com/Shougo/ddu-ui-filer')
vim.opt.runtimepath:prepend('~/.cache/dpp/repos/github.com/Shougo/ddu-source-file')
vim.opt.runtimepath:prepend('~/.cache/dpp/repos/github.com/Shougo/ddu-column-filename')
vim.opt.runtimepath:prepend('~/.cache/dpp/repos/github.com/Shougo/ddu-kind-file')

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

  1. $ mkdir -p foo/bar
  2. $ cd foo
  3. $ nvim
  4. :lua vim.fn['ddu#start'] { ui = 'filer', resume = true, sync = true, sources = { {name = 'file'} }, sourceOptions = { file = { columns = { 'filename' }, path = vim.fn.getcwd() } } }
  5. Selected bar directory.
  6. :call ddu#ui#do_action('expandItem', {'mode': 'toggle'})
  7. :call ddu#ui#do_action('itemAction', {'name': 'newFile'})
  8. Create hoge.txt file.
  9. :call ddu#ui#do_action('redraw')

Screenshot (if possible)

スクリーンショット 2024-05-15 034430

action collapseItem dose not work well.

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

Problems summary

When closing 2 or more expanded directories, collapseItem does not work.

Expected

Close all expanded directories.

Environment Information

  • ddu-ui-filer version (SHA1): 547b5b5

  • denops.vim version (SHA1): a40e0c10be0c67b5fd6cb9713914b9259dafa7e2

  • deno version(deno -V output): deno 1.24.3

  • OS: MacOS

  • neovim/Vim :version output:

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

      システム vimrc: "$VIM/sysinit.vim"
       省略時の $VIM: "/opt/homebrew/Cellar/neovim/0.7.2_1/share/nvim"

Run :checkhealth for more info

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

I used the column, but it is not necessary for reproducing this problem.

if !has("nvim")
  set nocompatible
  filetype plugin indent on
  syntax enable
endif

let s:plugins = [
      \ 'vim-denops/denops.vim',
      \ 'Shougo/ddu.vim',
      \ 'Shougo/ddu-ui-filer',
      \ 'Shougo/ddu-source-file',
      \ 'ryota2357/ddu-column-icon_filename',
      \ ]

for item in s:plugins
  execute 'set runtimepath+=~/.cache/dein/repos/github.com/' . item
endfor

call ddu#custom#patch_global({
    \   'ui': 'filer',
    \   'sources': [{'name': 'file'}],
    \   'sourceOptions' : {
    \     '_': { 'columns': ['icon_filename'] }
    \   },
    \ })

autocmd FileType ddu-filer call s:ddu_my_settings()
function! s:ddu_my_settings() abort
  nnoremap <buffer> c <Cmd>call ddu#ui#filer#do_action('collapseItem')<CR>
  nnoremap <buffer> e <Cmd>call ddu#ui#filer#do_action('expandItem')<CR>
endfunction
nnoremap <Space>o <Cmd>call ddu#start()<CR>

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

  1. start ddu by <Space>o
  2. on the directory push e to expand the directory, and in the hierarchy, re-expand another directory.
  3. back to the top directory of the expanded directory, push c to close.

Screenshot (if possible)

ddu-ui-filer-bug.mov

When you delete a file, the whole tree closes.

Sorry for bothering you again. I found a new bug.

Problems summary

When you delete a file, the whole tree closes.

Currently, if you delete a file and then redraw the tree in a closed state, the tree state will be restored.

Expected

Deleting a file does not close the tree.

Environment Information

  • ddu-ui-filer version (SHA1):94ad1d215fd48a4ef2311532a7383d44370ed53c

  • denops.vim version (SHA1):9dd9ae9da9b8d65916dd44e0e4d881665397de63

  • deno version(deno -V output):deno 1.43.4

  • OS:Linux

  • neovim/Vim :version output:NVIM v0.10.0-dev-3023+g499070148

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

set rtp+=~/work/denops.vim
set rtp+=~/work/ddu.vim
set rtp+=~/work/ddu-ui-filer
set rtp+=~/work/ddu-source-file
set rtp+=~/work/ddu-column-filename
set rtp+=~/work/ddu-kind-file

call ddu#start(#{
      \   ui: 'filer',
      \   resume: v:true,
      \   sync: v:true,
      \   sources: [
      \     #{name: 'file'},
      \   ],
      \   sourceOptions: #{
      \     file: #{
      \       columns: ['filename'],
      \       path: getcwd()
      \     }
      \   }
      \ })

autocmd FileType ddu-filer call s:ddu_filer_my_settings()
function s:ddu_filer_my_settings() abort
  nnoremap <buffer> o
  \ <Cmd>call ddu#ui#do_action('expandItem', {'mode': 'toggle'})<CR>
  nnoremap <buffer> D
  \ <Cmd>call ddu#ui#do_action('itemAction', {'name': 'delete'})<CR>
  nnoremap <buffer> <C-l>
  \ <Cmd>call ddu#ui#do_action('redraw')<CR>
endfunction

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

  1. $ mkdir -p foo/bar/hoge/
  2. $ touch foo/bar/hoge/text.txt
  3. $ cd foo
  4. $ nvim
  5. In the filer, perform a switch operation to the bar directory.
  6. In the filer, perform a switch operation to the hoge directory.
  7. Delete the text.txt file.
  8. This closes the whole tree. <--I consider this behavior a bug.
  9. In the filer, perform a redraw operation.
  10. The state of the tree is restored.

Redrawing the directory hierarchy becomes messed up

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

Problems summary

Redrawing the directory hierarchy becomes messed up.

Expected

Redrawing correctly.

Environment Information

  • ddu-ui-filer version (SHA1):94ad1d215fd48a4ef2311532a7383d44370ed53c

  • denops.vim version (SHA1):9dd9ae9da9b8d65916dd44e0e4d881665397de63

  • deno version(deno -V output):deno 1.43.4

  • OS: Linux

  • neovim/Vim :version output:NVIM v0.10.0-dev-3023+g499070148

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

set rtp+=~/work/denops.vim
set rtp+=~/work/ddu.vim
set rtp+=~/work/ddu-ui-filer
set rtp+=~/work/ddu-source-file
set rtp+=~/work/ddu-column-filename
set rtp+=~/work/ddu-kind-file

call ddu#start(#{
      \   ui: 'filer',
      \   resume: v:true,
      \   sync: v:true,
      \   sources: [
      \     #{name: 'file'},
      \   ],
      \   sourceOptions: #{
      \     file: #{
      \       columns: ['filename'],
      \       path: getcwd()
      \     }
      \   }
      \ })

autocmd FileType ddu-filer call s:ddu_filer_my_settings()
function s:ddu_filer_my_settings() abort
  nnoremap <buffer> o
  \ <Cmd>call ddu#ui#do_action('expandItem', {'mode': 'toggle'})<CR>
  nnoremap <buffer> N
  \ <Cmd>call ddu#ui#do_action('itemAction', {'name': 'newFile'})<CR>
  nnoremap <buffer> <C-l>
  \ <Cmd>call ddu#ui#do_action('redraw')<CR>
endfunction

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

  1. $ mkdir -p foo/bar
  2. $ nvim
  3. Perform foo directory toggle operation on filer.
  4. Perform bar directory toggle operation on filer.
  5. Perform hoge.txt file newFile operation on filer.
  6. Place the cursor on the foo directory.
  7. Perform foo directory toggle operation on filer.
  8. Perform redraw operation with filer.

Screenshot (if possible)

スクリーンショット 2024-05-19 002056

スクリーンショット 2024-05-19 002111

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.