Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key Bindings - Not Working Properly - gotoParent #431

Closed
rbharathkumar opened this issue May 15, 2021 · 5 comments
Closed

Key Bindings - Not Working Properly - gotoParent #431

rbharathkumar opened this issue May 15, 2021 · 5 comments
Assignees
Labels
bug/upstream bug Something isn't working question Further information is requested

Comments

@rbharathkumar
Copy link

rbharathkumar commented May 15, 2021

Hi,
I am currently using the stable version of neovim 0.4.4 in Windows 10. Installed via scoop.
Followed steps to install coc.nvim and the coc-explorer.
I am facing issues with a couple of items.

  1. When I cd into a folder, I am not able to get to the parent directory.
    1.1. I uninstalled and tried the default config again.
    1.2. I have tried setting keybindings with and without the wait option.
    "<bs>": ["wait", "gotoParent"]
    1.3. I have restarted coc using the CocRestart option.

Please find my coc-settings as of now.

1 // coc-settings.json
 2 {
 3         "explorer.icon.enableNerdfont": true,
 4         "explorer.icon.enableVimDevicons": false,
 5         "explorer.width": 30,
 6         "explorer.quitOnOpen": true,
 7         "explorer.position": "left",
 8         "explorer.file.showHiddenFiles": true,
 9         "explorer.openAction.strategy": "tab"
10 }

I only have one mapping in my init.vim file
:nnoremap e :CocCommand explorer

Kindly let me know for any further information.

@rbharathkumar rbharathkumar changed the title Key Bindings - Not Working Properly - gotoParent & DevIcons Key Bindings - Not Working Properly - gotoParent May 15, 2021
@weirongxu
Copy link
Owner

I cannot reproduce this issue in windows 10 and nvim4.4. What terminal do you use? Also, have you configured the nerdfont correctly?

@weirongxu weirongxu added can't reproduce question Further information is requested labels May 16, 2021
@rbharathkumar
Copy link
Author

Thank you for your response.
I am using the Windows Terminal running powershell.
Maybe below steps to reproduce may help ?

  1. Software installation
    scoop install neovim
    scoop install nodejs
    npm install -g neovim
  2. Update the init.vim file and PlugInstall.
    Plug 'neoclide/coc.nvim', {'branch': 'release'}
    PlugInstall
  3. Install coc-explorer
    :CocInstall coc-json
    :CocInstall coc-explorer
  4. Update the coc-settings.json
// coc-settings.json
{
	"explorer.icon.enableNerdfont": true,
	"explorer.icon.enableVimDevicons": true,
	"explorer.width": 30,
	"explorer.quitOnOpen": true,
	"explorer.position": "left",
	"explorer.file.showHiddenFiles": true,
	"explorer.openAction.strategy": "tab"
}

Issue is as below.

  1. Pressing Enter - changes my directory as expected.
  2. But when I press Backspace - I am unable to cd back to the parent directory or even collapse back to the parent directory.
  3. When is pressed from Directory - the cursor goes to the last character of parent directory - refer Screenshot below
    Backspace_From_Directory
  4. When is pressed from File- the cursor goes to the last character of previous line- usually the size of that file - refer Screenshot below
    Backspace_From_File

This basically prevents me to moving to any other directory apart from the one I am currently in. Especially difficult when I am working with multi-level directories.
5. Kindly let me know if you need any further information.
Please ignore the comments about the devicons - on reinstallation it worked fine.

@weirongxu
Copy link
Owner

weirongxu commented May 16, 2021

I can reproduce this in nvim 4.4 with Powershell.

Seems in this environment the <bs> doesn't work at all, but nvim 5.0 is working fine.

@weirongxu
Copy link
Owner

You can switch to another version of nvim, or use explorer.keyMappings.global to use other keys...

@weirongxu weirongxu added the bug Something isn't working label May 16, 2021
@rbharathkumar
Copy link
Author

ok thank you for your efforts.
I would appreciate if you can make a note of it in the readme or somewhere..
Kind of spent a lot of time researching before filing the bug.
Thank you once again for all the wonderful work - I hope it gets fixed soon.

@weirongxu weirongxu self-assigned this May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/upstream bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants