antoinemadec / coc-fzf

fzf :heart: coc.nvim
390 stars 28 forks source link

Exclude symbols from CocLocalConfig #104

Closed alipirpiran closed 3 years ago

alipirpiran commented 3 years ago

in issue #102 bug is fixed only for global CocConfig but CocLocalConfig still has the bug.

list.source.symbols.excludes works fine in CocConfig, but setting list.source.symbols.excludes in CocLocalConfig seems has no effect.

CocLocalConfig location is project_dir/.vim/coc-settings.json

antoinemadec commented 3 years ago

@alipirpiran could you please:

  1. provide me with a simple testcase (and minimal vimrc if needed)
  2. what is the output of echo coc#util#get_config('list.source.symbols'), does this take the local config into account?
  3. what is the output of pwd, is it inside or outside of you project?

get_config() is the only way we can know what the excludes are. This seems to be the culprit for now.

alipirpiran commented 3 years ago

yes, i changed list.source.symbols.excludes in local config and it overrides the values in global config. output of echo coc#util#get_config('list.source.symbols') changed to local config. but this has no effect in coc-fzf

global config: ['test'] local config: ['*/node_modules/**', \'*\/.git/\'] output of echo coc#util#get_config('list.source.symbols'): `{'defaultArgs': [], 'excludes': ['/node_modules/', '/.git/**'], 'defaultOptions': ['--interactive'], 'defaultAction': v:null}`

pwd was inside project.

antoinemadec commented 3 years ago

@alipirpiran this should fix it. The local config was not caught since get_config() was called after the terminal was opened.

Please reopen if you see any issues, thanks for taking the time to open this issue :wink:

alipirpiran commented 3 years ago

it seems after this update it cause vim crash, with error of pointer.

antoinemadec commented 3 years ago

That is unexpected. I will need you to open a new issue and to follow the template precisely with all required info so i can debug it.

antoinemadec commented 3 years ago

@alipirpiran any news about this ? I can't reproduce this on my end.