Closed chunxuan-hs closed 9 months ago
It seems Library/
is found by project-root search. Configuring projFromCwdMaxItems = []
and projFromBufMaxItems = []
then you can disable proj root search completely. Is this fixing your case?
See docs for details about settings: https://github.com/LumaKernel/ddc-source-file/blob/main/doc/ddc-file.txt
Seems not working.
New conifg
call ddc#custom#patch_filetype(
\ ['ps1', 'dosbatch', 'autohotkey', 'registry'], {
\ 'sourceOptions': {
\ 'file': {
\ 'forceCompletionPattern': '\S\\\S*',
\ }},
\ 'sourceParams': {
\ 'file': {
\ 'projFromCwdMaxItems': [],
\ 'projFromBufMaxItems': [],
\ }}})
As showed in the screenshot, I edited a file in Download folder, but Library
, .matplotlib
under home folder "~" are still in the popup:
I am using nvim 0.9.4, willing to provide more info.
Hm... I will test it later.
But please create the minimal vimrc. Your config is not minimal.
I have created the minimal vimrc.
set nocompatible
set runtimepath+=~/work/denops.vim
set runtimepath+=~/work/ddc.vim
set runtimepath+=~/src/ddc-source-file
set runtimepath+=~/work/ddc-filter-matcher_head
set runtimepath+=~/work/ddc-filter-sorter_rank
set runtimepath+=~/work/ddc-ui-native
" Customize global settings
call ddc#custom#patch_global('ui', 'native')
call ddc#custom#patch_global('sources', ['file'])
call ddc#custom#patch_global('sourceOptions', {
\ '_': {
\ 'matchers': ['matcher_head'],
\ 'ignoreCase': v:true,
\ 'sorters': ['sorter_rank'],
\ 'minAutoCompleteLength': 1},
\ 'file': {
\ 'mark': 'F',
\ 'matchers': ['matcher_head'],
\ 'dup': v:true,
\ 'isVolatile': v:true,
\ 'forceCompletionPattern': '\S/\S*'},
\ })
call ddc#custom#patch_global({
\ 'sourceParams': {
\ 'file': {
\ 'projFromCwdMaxItems': [],
\ 'projFromBufMaxItems': [],
\ }
\ }
\ })
" Use ddc.
call ddc#enable()
Please provide the instruction to reproduce your problem.
@chunxuan-hs Why you only set the config for ['ps1', 'dosbatch', 'autohotkey', 'registry']
files?
Because you have tested it on R files(r
filetype).
@Shougo The config is taken from the readme of this plugin, actually I am not sure about the meanings. See https://github.com/LumaKernel/ddc-source-file?tab=readme-ov-file#configuration
Oh, you need to understand what you configure. Because it is ddc.vim
's policy.
If so please test my minimal config.
@Shougo @LumaKernel Thanks you all for helpful ideas, the new configs seem to work well:
call ddc#custom#patch_global({
\ 'sourceParams': {
\ 'file': {
\ 'projFromCwdMaxItems': [],
\ 'projFromBufMaxItems': [],
\ 'bufMaxItems': 0,
\ }
\ }
\ })
How to make
ddc-source-file
only list the files under the current folder. At the moment when I start to type, it seems to list folder starting from my home folder.Here is my config:
In the screenshot, when I typed "lib", popup menu suggest "Library/", which I am not interested at all.