Closed otoyo closed 2 years ago
Thank you very much for developing nice plugin.
When I passes expand('%:p') to ddu-ui-filer-param-search, it opens not-ancestor directories.
expand('%:p')
Please let me know how to open only ancestor directories.
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
ddu-ui-filer version (SHA1): 050b2c779e9fc4b22e113e570b50588c6a35432d
050b2c779e9fc4b22e113e570b50588c6a35432d
denops.vim version (SHA1): a40e0c10be0c67b5fd6cb9713914b9259dafa7e2
a40e0c10be0c67b5fd6cb9713914b9259dafa7e2
deno version(deno -V output): deno 1.22.0
deno -V
deno 1.22.0
OS: MacOS Monterey 12.4
MacOS Monterey 12.4
neovim/Vim :version output:
:version
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>
;d
Fixed. Please update ddu.vim.
Thank you for the fix!
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
expected
actual
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 root@apple.com 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!)
How to reproduce the problem from neovim/Vim startup (Required!)
;d
Screenshot (if possible)