Skip to content

Commit

Permalink
feat: show more informative errors when rplugins were not registered
Browse files Browse the repository at this point in the history
Many users who are not familiar with how neovim and rplugins works often
get lost on the error 'Semshi: command not found and keeps asking the
same question (e.g., numirias#74), although the easy solution
that one should run `:UpdateRemotePlugins` is already documented.

Nevertheless we can show more informative, fool-proof error messages on
`:Semshi` when remote plugins are not registered or broken somehow.
  • Loading branch information
wookayin committed Oct 31, 2023
1 parent 50f9d74 commit 69bfe64
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/semshi.vim
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ function! s:remove_builtin_extra()
hi link pythonKeyword pythonNumber
endfunction

if exists(':Semshi') == 0
command! -nargs=* Semshi call nvim_err_writeln(":Semshi not found. Run :UpdateRemotePlugins.")
endif

function! s:filetype_changed()
let l:ft = expand('<amatch>')
if index(g:semshi#filetypes, l:ft) != -1
Expand Down

0 comments on commit 69bfe64

Please sign in to comment.