vim-denops / denops.vim

🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno
https://vim-denops.github.io/denops-documentation/
MIT License
685 stars 36 forks source link

`denops#plugin#check_type()` shows a usage help message of `deno check` #406

Closed Milly closed 3 months ago

Milly commented 3 months ago

Describe the bug

In some case:

denops#plugin#check_type() shows a usage help message of deno check. This is unfriendly to users.

Provide a minimal vimrc with less than 50 lines to reproduce

set runtimepath+=path/to/denops.vim

" Case 1
call denops#plugin#check_type("notloadedplugin")

" Case 2
call denops#plugin#check_type()

How to reproduce the problem from Vim startup

Runs: vim -Nu vimrc

Expected behavior

Outputs user friendly (info) messages like:

[denops] No plugins are loaded

Actual behavior

Outputs messages:

[denops] error: the following required arguments were not provided:
[denops]   <file>...
[denops] Usage: deno check <file>...
[denops] For more information, try '--help'.
[denops] Type check failed: 1

Your environment