kabouzeid / nvim-lspinstall

Provides the missing :LspInstall for nvim-lspconfig
MIT License
526 stars 67 forks source link

Installing Lua fails in OSX #119

Open soerenmartius opened 3 years ago

soerenmartius commented 3 years ago

Trying to run LspInstall lua in MacOS 11.4 is failing. I am currently debugging the installer. in https://github.com/kabouzeid/nvim-lspinstall/blob/main/lua/lspinstall/servers/lua.lua#L17 there seems to be an issue with getting the right download URL. Instead of downloading the file, the file sumneko-lua.vsix contains a request of the GitHub API which breaks the installer.

{"url":"https://api.github.com/repos/sumneko/vscode-lua/releases/45956278","assets_url":"https://api.github.com/repos/sumneko/vscode-lua/releases/45956278/assets","upload_url":"https://uploads.github.com/repos/sumneko/vscode-lua/releases/45956278/assets{?name,label}","html_url":"https://github.com/sumneko/vscode-lua/releases/tag/v2.2.3","id":45956278,"author":{"login":"sumneko","id":5213431,"node_id":"MDQ6VXNlcjUyMTM0MzE=","avatar_url":"https://avatars.githubusercontent.com/u/5213431?v=4","gravatar_id":"","url":"https://api.github.com/users/sumneko","html_url":"https://github.com/sumneko","followers_url":"https://api.github.com/users/sumneko/followers","following_url":"https://api.github.com/users/sumneko/following{/other_user}","gists_url":"https://api.github.com/users/sumneko/gists{/gist_id}","starred_url":"https://api.github.com/users/sumneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumneko/subscriptions","organizations_url":"https://api.github.com/users/sumneko/orgs","repos_url":"https://api.github.com/users/sumneko/repos","events_url":"https://api.github.com/users/sumneko/events{/privacy}","received_events_url":"https://api.github.com/users/sumneko/received_events","type":"User","site_admin":false},"node_id":"MDc6UmVsZWFzZTQ1OTU2Mjc4","tag_name":"v2.2.3","target_commitish":"master","name":"","draft":false,"prerelease":false,"created_at":"2021-07-09T09:28:32Z","published_at":"2021-07-09T09:29:31Z","assets":[{"url":"https://api.github.com/repos/sumneko/vscode-lua/releases/assets/39987110","id":39987110,"node_id":"MDEyOlJlbGVhc2VBc3NldDM5OTg3MTEw","name":"lua-2.2.3.vsix","label":null,"uploader":{"login":"sumneko","id":5213431,"node_id":"MDQ6VXNlcjUyMTM0MzE=","avatar_url":"https://avatars.githubusercontent.com/u/5213431?v=4","gravatar_id":"","url":"https://api.github.com/users/sumneko","html_url":"https://github.com/sumneko","followers_url":"https://api.github.com/users/sumneko/followers","following_url":"https://api.github.com/users/sumneko/following{/other_user}","gists_url":"https://api.github.com/users/sumneko/gists{/gist_id}","starred_url":"https://api.github.com/users/sumneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumneko/subscriptions","organizations_url":"https://api.github.com/users/sumneko/orgs","repos_url":"https://api.github.com/users/sumneko/repos","events_url":"https://api.github.com/users/sumneko/events{/privacy}","received_events_url":"https://api.github.com/users/sumneko/received_events","type":"User","site_admin":false},"content_type":"application/vsix","state":"uploaded","size":3863699,"download_count":981,"created_at":"2021-07-09T09:29:26Z","updated_at":"2021-07-09T09:29:30Z","browser_download_url":"https://github.com/sumneko/vscode-lua/releases/download/v2.2.3/lua-2.2.3.vsix"}],"tarball_url":"https://api.github.com/repos/sumneko/vscode-lua/tarball/v2.2.3","zipball_url":"https://api.github.com/repos/sumneko/vscode-lua/zipball/v2.2.3","body":""}
kabouzeid commented 3 years ago

Hmm it works for me, and I'm on macOS too. Did you find anything?

soerenmartius commented 2 years ago

Hmm it works for me, and I'm on macOS too. Did you find anything?

grep seems to cause the problem. What version of grep are you using?

❯ grep -V                                                                                                                                                                                                                                                   
grep (BSD grep) 2.5.1-FreeBSD
kabouzeid commented 2 years ago

Same version

soerenmartius commented 2 years ago

Same version

ah my bad, I assume I am on a different version of cut

❯ cut --version                                                                                                                                                                                                                                             ~
cut (GNU coreutils) 8.32
Packaged by https://NixOS.org
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David M. Ihnat, David MacKenzie, and Jim Meyering.
kabouzeid commented 2 years ago

yes, I'm using /usr/bin/cut which doesn't even has the --version argument

kabouzeid commented 2 years ago

feel free to make a PR with cut arguments that work with your cut version then :)