weirongxu / coc-explorer

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

[BUG] F2 refactor (`<Plug>(coc-rename)`) doesn't work anymore after coc-explorer got installed (tested with Typescript) #545

Closed 205g0 closed 2 years ago

205g0 commented 2 years ago

Describe the bug

F2 refactor (<Plug>(coc-rename)) doesn't work anymore after coc-explorer got installed

In the status bar I get:

Error detected while processing function coc#dialog#create_prompt_win[16]..coc#float#create_float_win:   line   81:                                                                                               Press ENTER or type command to continue                                                                  

After pressing enter I get:

Error detected while processing function coc#dialog#create_prompt_win[16]..coc#float#create_float_win:     line   81:                                                                                                 Press ENTER or type command to continue                                                                   
[coc.nvim] Error on notification "rename": Vim(call):E5248: Invalid character in group name              
Press ENTER or type command to continue                                                                    

Result from CocInfo

2022-09-28T04:54:54.101 INFO (pid:883166) [attach] - receive notification: highlight []
2022-09-28T04:55:01.043 INFO (pid:883166) [attach] - receive notification: highlight []
2022-09-28T04:55:09.366 INFO (pid:883166) [attach] - receive notification: highlight []
2022-09-28T04:55:11.331 INFO (pid:883166) [attach] - Request action: doKeymap [ 'explorer-key-n-l' ]
2022-09-28T04:55:12.405 INFO (pid:883166) [attach] - receive notification: highlight []
2022-09-28T04:55:15.591 INFO (pid:883166) [attach] - receive notification: highlight []
2022-09-28T04:55:16.494 INFO (pid:883166) [attach] - receive notification: rename []
2022-09-28T04:55:16.823 INFO (pid:883166) [attach] - receive notification: highlight []
2022-09-28T04:55:21.355 INFO (pid:883166) [attach] - receive notification: highlight []
2022-09-28T04:55:22.489 INFO (pid:883166) [attach] - receive notification: rename []
2022-09-28T04:55:22.838 INFO (pid:883166) [attach] - receive notification: highlight []
2022-09-28T04:55:25.924 INFO (pid:883166) [attach] - receive notification: highlight []
2022-09-28T04:55:26.189 ERROR (pid:883166) [node-client] - request error on "nvim_call_function" [
  'coc#dialog#create_prompt_win',
  [
    'New name',
    'data',
    {
      rounded: true,
      maxWidth: 80,
      highlight: undefined,
      borderhighlight: undefined
    }
  ]
] Vim(call):E5248: Invalid character in group name Error
    at HM.request (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:29:43425)
    at HM.call (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:34:3815)
    at ru.show (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:274:18659)
    at /home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:275:12482
    at /home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:146:1282
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Uee.requestInput (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:275:12407)
    at async ox.rename (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:297:8711)
    at async Cx.cocAction (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:17532)
    at async HM.<anonymous> (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:19103)
2022-09-28T04:55:26.192 ERROR (pid:883166) [node-client] - Error on notification "rename": Vim(call):E5248: Invalid character in group name Error
    at HM.echoError (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:35:1869)
    at HM.<anonymous> (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:19140)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-09-28T04:55:26.192 ERROR (pid:883166) [attach] - Error: request error on nvim_call_function - Vim(call):E5248: Invalid character in group name
    at ru.show (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:274:18659)
    at /home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:275:12482
    at /home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:146:1282
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Uee.requestInput (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:275:12407)
    at async ox.rename (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:297:8711)
    at async Cx.cocAction (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:17532)
    at async HM.<anonymous> (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:19103)
2022-09-28T04:56:00.433 ERROR (pid:883166) [node-client] - request error on "nvim_call_function" [
  'coc#dialog#create_prompt_win',
  [
    'New name',
    'data',
    {
      rounded: true,
      maxWidth: 80,
      highlight: undefined,
      borderhighlight: undefined
    }
  ]
] Vim(call):E5248: Invalid character in group name Error
    at HM.request (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:29:43425)
    at HM.call (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:34:3815)
    at ru.show (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:274:18659)
    at /home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:275:12482
    at /home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:146:1282
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Uee.requestInput (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:275:12407)
    at async ox.rename (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:297:8711)
    at async Cx.cocAction (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:17532)
    at async HM.<anonymous> (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:19103)
2022-09-28T04:56:00.434 ERROR (pid:883166) [node-client] - Error on notification "rename": Vim(call):E5248: Invalid character in group name Error
    at HM.echoError (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:35:1869)
    at HM.<anonymous> (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:19140)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-09-28T04:56:00.434 ERROR (pid:883166) [attach] - Error: request error on nvim_call_function - Vim(call):E5248: Invalid character in group name
    at ru.show (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:274:18659)
    at /home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:275:12482
    at /home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:146:1282
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Uee.requestInput (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:275:12407)
    at async ox.rename (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:297:8711)
    at async Cx.cocAction (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:17532)
    at async HM.<anonymous> (/home/me/.local/share/nvim/plugged/coc.nvim/build/index.js:301:19103)
2022-09-28T04:57:03.666 INFO (pid:883166) [attach] - receive notification: showInfo []

Steps to reproduce Steps to reproduce the behavior:

  1. execute nvim
  2. :CocExplorer
  3. Refactor some variable in a Typescript file with F2 mapped to <Plug>(coc-rename)
  4. See error

Expected behavior

A normal refactor like with VS Code over all relevant vars in all files.

weirongxu commented 2 years ago

Can't reproduce it in the latest version, Perhaps related to the theme, what is your theme used?

205g0 commented 2 years ago

Thanks for the quick feedback, I just update both coc-explorer and coc.vim to the latest and now it works fine 🙂thanks and closing...

205g0 commented 2 years ago

and btw, coc-explorer is awesome, thanks for your great work!!