stevearc / gkeep.nvim

Google Keep integration for Neovim
MIT License
192 stars 6 forks source link

Does not cleanly uninstall -- Please help -- #16

Closed anoduck closed 12 months ago

anoduck commented 12 months ago

Describe the bug Received very annoying error messages after uninstalling gkeep.nvim. Ensured any mention of gkeep was not present in either my configuration files, nor in the plugin directory. Finally tracked down the error to the rplugin.nvim file located in ~/.local/share/nvim/rplugin.nvim. Where plenty of mentioning was present.

To Reproduce Steps to reproduce the behavior:

  1. I assume this problem is related to how the plugin interacts with lazy.
  2. Install Lazy.nvim
  3. A gkeep to configuration files for lazy.nvim to install.
  4. Install required python package for plugin.
  5. Have lazy install gkeep plugin.
  6. Now try to remove it by:
  7. Remove gkeep.nvim from configuration files.
  8. Have lazy clean gkeep from the system.
  9. Error should appear now.

Expected behavior It would be nice if my experience is confirmed, and somehow the removal of these additional configuration lines successfully resolved.

Version information

Received errors

Error detected while processing BufEnter Autocommands for "*"..function remote#define#AutocmdBootstrap[7]..BufEnter Autocommands for "*"..function remote#define#request:                                                                                                         
line    2:                                                                                                                                                                                                                                                                        
Error invoking '/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkeep:autocmd:BufEnter:*' on channel 4 (python3-rplugin-host):                                                                                                                                  
no request handler registered for "/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkeep:autocmd:BufEnter:*" 
Error executing vim.schedule lua callback: ....local/share/nvim/lazy/lazy.nvim/lua/lazy/view/float.lua:207: BufEnter Autocommands for "*"..function remote#define#request, line 2: Vim(let):Error invoking '/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkee
p:autocmd:BufEnter:*' on channel 4 (python3-rplugin-host):                                                                                                                                                                                                                        
no request handler registered for "/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkeep:autocmd:BufEnter:*"                                                                                                                                                    
stack traceback:                                                                                                                                                                                                                                                                  
        [C]: in function 'nvim_win_close'                                                                                                                                                                                                                                         
        ....local/share/nvim/lazy/lazy.nvim/lua/lazy/view/float.lua:207: in function <....local/share/nvim/lazy/lazy.nvim/lua/lazy/view/float.lua:205>

Contents of rplugin.nvim

call remote#host#RegisterPlugin('python3', '/home/user/.local/share/nvim/lazy/gkeep.nvim/rplugin/python3/gkeep', [
      \ {'sync': v:true, 'name': '_gkeep_complete_enter', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_complete_new', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_complete_position', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'BufReadCmd', 'type': 'autocmd', 'opts': {'pattern': 'gkeep://*', 'eval': 'expand("<amatch>")'}},
      \ {'sync': v:true, 'name': '_gkeep_sync_file', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'BufEnter', 'type': 'autocmd', 'opts': {'pattern': '*', 'eval': 'expand("<abuf>")'}},
      \ {'sync': v:true, 'name': '_gkeep_buf_write_pre', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'BufWriteCmd', 'type': 'autocmd', 'opts': {'pattern': 'gkeep://*', 'eval': 'expand("<abuf>")'}},
      \ {'sync': v:true, 'name': '_gkeep_set_note_type', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_prompt_close', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepBrowse', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepCheck', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepClearChecked', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepClose', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepEnter', 'type': 'command', 'opts': {'complete': 'customlist,_gkeep_complete_enter', 'nargs': '*'}},
      \ {'sync': v:true, 'name': 'GkeepGoto', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepLogin', 'type': 'command', 'opts': {'nargs': '*'}},
      \ {'sync': v:true, 'name': 'GkeepLogout', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepNew', 'type': 'command', 'opts': {'complete': 'customlist,_gkeep_complete_new', 'nargs': '*'}},
      \ {'sync': v:true, 'name': 'GkeepOpen', 'type': 'command', 'opts': {'complete': 'customlist,_gkeep_complete_position', 'nargs': '?'}},
      \ {'sync': v:true, 'name': 'GkeepPopup', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepRefresh', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepSortChecked', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepSync', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepToggle', 'type': 'command', 'opts': {'complete': 'customlist,_gkeep_complete_position', 'nargs': '?'}},
      \ {'sync': v:true, 'name': 'GkeepUpdateLinks', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepYank', 'type': 'command', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_dispatch', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'GkeepStatus', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_all_notes', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_health', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_list_action', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_menu_action', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_modal', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_omnifunc', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_popup_action', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': '_gkeep_preload', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': '_gkeep_preload_if_any_open', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_render_note', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': '_gkeep_search', 'type': 'function', 'opts': {}},
     \ ])
stevearc commented 12 months ago

From :help remote-plugin-manifest

Just installing remote plugins to "rplugin/{host}" isn't enough for them to be automatically loaded when required. You must execute :UpdateRemotePlugins every time a remote plugin is installed, updated, or deleted.

You need to call :UpdateRemotePlugins to regenerate rplugin.vim

anoduck commented 12 months ago

How was I supposed to know? You can't read every man/info/help document. In the least, you might want to add a notation to the README.md to prevent future inquiries. Thanks for the enlightenment. Cheers.