weirongxu / coc-explorer

📁 Explorer for coc.nvim
MIT License
1.14k stars 45 forks source link

[BUG] recently the jump doesn't work anymore #571

Open GopherJ opened 1 year ago

GopherJ commented 1 year ago

Describe the bug

  "explorer.keyMappings.global": {
    "<leader>k": ["wait", "markPrev:diagnosticError"],
    "<leader>j": ["wait", "markNext:diagnosticError"],
    "<leader>K": ["wait", "markPrev:diagnosticWarning"],
    "<leader>J": ["wait", "markNext:diagnosticWarning"],
    "f": "search",
    "F": "search:recursive",
    "d": "delete",
    "D": "deleteForever",
    ";k": ["wait", "markPrev:gitUnstaged"],
    ";j": ["wait", "markNext:gitUnstaged"],
    ">>": "gitStage",
    "<<": "gitUnstage"
  },
" coc-explorer
nmap <silent> <space>e :CocCommand explorer --preset default<CR>
" autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | qall! | endif
let g:indentLine_fileTypeExclude = ['coc-explorer']
let g:indentLine_setConceal = 0
let g:indentLine_fileTypeExclude = ['json']

let g:coc_explorer_global_presets = {
            \   'default': {
            \     'file-child-template': '[indent][icon | 1] [diagnosticError & 1][filename omitCenter 1] [linkIcon & 1][link growRight 1 omitCenter 5]'
            \   }
            \ }

I have this mapping and config, the mapping it works pretty well previously, but recently it's broken after certain version

Result from CocInfo

Steps to reproduce Steps to reproduce the behavior:

  1. execute nvim
  2. :CocExplorer ...
  3. See error

Expected behavior

Screenshots

Additional context None

GopherJ commented 1 year ago

I cannot jump to a file with git modification/warnings/errors any more

GopherJ commented 1 year ago

My config can be viewed at: https://github.com/GopherJ/cfg/tree/master/coc

weirongxu commented 12 months ago

I'm using the latest version of coc.nvim and I'm not reproducing the problem. What is the result of running :verbose nmap <leader>k in the coc-explorer buffer?

GopherJ commented 11 months ago

@weirongxu it returns this:

n  \k           @<Plug>(coc-explorer-key-n-[leader]k)
        Last set from ~/.config/coc/extensions/node_modules/coc-explorer/autoload/coc_explorer/mappings
.vim line 13
n  \k            <Plug>(coc-diagnostic-prev-error)
        Last set from ~/.vim/init.vim line 496
Press ENTER or type command to continue
GopherJ commented 11 months ago

I tried again and it seems <leader>k,j,K, J is working, ;k,j is still broken, I have the following in ~/.vimrc, not sure if it's related

nmap <expr> ;k empty(get(b:, "coc_git_status", "")) ? "<Plug>(coc-git-prevconflict)" : "<Plug>(coc-git-prevchunk)"
nmap <expr> ;j empty(get(b:, "coc_git_status", "")) ? "<Plug>(coc-git-nextconflict)" : "<Plug>(coc-git-nextchunk)"