我想为python for vim尝试一个自动完成工具,所以我决定为vim安装coc,所以我通过进入.virc文件并添加来安装
call plug#begin(~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'}
call plug#end()
但是我刚刚得到错误
I get the error: "[coc.nvim] build/index.js not found, please install dependencies and complie coc.nvim by: yarn install"
所以我尝试通过访问他们的网站来安装纱线
yarnpkg.com
然后我转到安装页面
https://yarnpkg.com/getting-started/install
我正确地遵循了所有步骤,我有node.js版本v17.8.0我得到了这个错误:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:Usersjimmy> corepack enable
PS C:Usersjimmy> npm i -g corepack
added 1 package, and audited 2 packages in 2s
found 0 vulnerabilities
PS C:Usersjimmy> yarn init -2
yarn : File C:Program Filesnodejsyarn.ps1 cannot be loaded. The file C:Program Filesnodejsyarn.ps1 is not
digitally signed. You cannot run this script on the current system. For more information about running scripts and
setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ yarn init -2
+ ~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
我不知道刚刚发生了什么,所以我继续下一步
PS C:Usersjimmy> yarn set version stable
yarn : File C:Program Filesnodejsyarn.ps1 cannot be loaded. The file C:Program
Filesnodejsyarn.ps1 is not
digitally signed. You cannot run this script on the current system. For more information
about running scripts and
setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?
LinkID=135170.
At line:1 char:1
+ yarn set version stable
+ ~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS C:Usersjimmy>
我现在了解了插件管理器是如何工作的。起初,我认为它只从目录中安装插件,而不认为你可以下载文件,所以我用了最困难的方法,最简单的方法是添加
Plugin 'neoclide/coc.vim'
然后转到vim命令并键入
PluginInstall
就是