Skip to content

根据文档在WIN下用VSCODE安装还是报错 #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gVimer opened this issue May 19, 2020 · 15 comments
Closed

根据文档在WIN下用VSCODE安装还是报错 #165

gVimer opened this issue May 19, 2020 · 15 comments

Comments

@gVimer
Copy link

gVimer commented May 19, 2020

QQ截图20200520071606

@gVimer
Copy link
Author

gVimer commented May 19, 2020

WINDOW下的 这个要怎么解决了

@sumneko
Copy link
Collaborator

sumneko commented May 20, 2020

windows平台你可以直接用插件编译好的二进制文件

@gVimer
Copy link
Author

gVimer commented May 20, 2020

哈哈 好的 多谢了 还是建议文档里面说清楚

@gVimer
Copy link
Author

gVimer commented May 20, 2020

顺便在问下 我能在WIN下gVIM用这个插件吗

@sumneko
Copy link
Collaborator

sumneko commented May 20, 2020

我没有用过 gVIM 不清楚,你可以去查询一下他们是否支持 lsp ,理论上支持 lsp 的客户端都可以使用此插件

@gVimer
Copy link
Author

gVimer commented May 20, 2020

支持的 问题是我不知道怎么配置 后面官方会考虑支持吗 毕竟VIM也还是有一大群用户的

@gVimer
Copy link
Author

gVimer commented May 20, 2020

哈哈 已经搞定了 这两天麻烦你了哈
let lua_lsp = glob('~/.vscode/extensions/sumneko.lua*', 0, 1)
if len(lua_lsp)
let lua_lsp = lua_lsp[-1] . '\server'
call coc#config('languageserver', {
\ 'lua-language-server': {
\ 'cwd': lua_lsp,
\ 'command': lua_lsp . '\bin\windows\lua-language-server.exe',
\ 'args': ['-E', '-e', 'LANG="zh-cn"', lua_lsp . '\main.lua'],
\ 'filetypes': ['lua'],
\ }
\ })
endif
这个ISSUE可以关闭了

@sumneko
Copy link
Collaborator

sumneko commented May 20, 2020

来帮我写一下wiki呗

@gVimer
Copy link
Author

gVimer commented May 20, 2020

https://github.com/neoclide/coc.nvim/wiki/Language-servers 其实就是这里面有说明的 但是这里面路径有点点不对 改成上面的\bin\windows\lua-language-server.exe',就可以了 然后就是我之前没用过VSCode 所以不知道还有这波操作 就是在VSCODE里面下载插件 然后在VIM中配置即可 还没写过WiKi呢 不知道咋写呢

@gVimer
Copy link
Author

gVimer commented May 20, 2020

哦 还有个最大的坑就是客服端的lua-lsp有个BUG在WIN下 即: coc\extensions\node_modules\coc-lua\lib\utils\tools.js中有行代码是这样的: return path_1.default.join(yield config_1.configDir('tools', 'bin'), 'lua-lsp'); 在WIN下要改成 return path_1.default.join(yield config_1.configDir('tools', 'bin'), 'lua-lsp.BAT'); 我一直没弄好就是因为这个原因 加上对JS不熟 都是一步步调出来才找到这个BUG的 真的是醉了

@sumneko
Copy link
Collaborator

sumneko commented May 20, 2020

建议给他们提个issue 233

@gVimer
Copy link
Author

gVimer commented May 20, 2020

好的 过两天我来第一次写WiKi哈

@gVimer
Copy link
Author

gVimer commented May 20, 2020

请问这种错误提示如何关闭呢
微信截图_20200520210422

@gVimer
Copy link
Author

gVimer commented May 21, 2020

总是提示这个
{56A29803-B52F-4604-A831-F2311949D6BC}_20200521091608

@sumneko
Copy link
Collaborator

sumneko commented May 21, 2020

参考:#154

@gVimer gVimer changed the title 根据文档在VSCODE中安装还是报错-太难了 根据文档在WIN下用VSCODE安装还是报错 May 21, 2020
@gVimer gVimer closed this as completed Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants