android support
When i tried to install basedpyright using
pip install basedpyright
It failed because it was unable to find cmake.
So I installed cmake and it downloaded
So, Please add following lines in documentation
> Before installing **basedpyright** make sure you have cmake installed.
Could you please add your full system+python details and installation output. Basedpyright should not require cmake
System info: Linux localhost 4.14.180-perf+ #2 SMP PREEMPT Sat Sep 3 23:17:03 CST 2022 aarch64 Android
Python info: python -V Python 3.11.9
I am using pip
pip install basedpyright
Error occurs in this process:
Building wheel for nodejs-wheel-binaries (pyproject.toml)
the issue is that nodejs-wheel (the package we use to automatically handle nodejs so that users don't have to) only bundles wheels for windows, macos and linux. but you're on android, so i would recommend raising an issue there to see if they're willing to publish wheels for android.
as a workaround, if you install nodejs manually, you can install the basedpyright npm package instead
I installed basedpyright using Node.js as you suggested, but will it work with Neovim? When I try to install it using MasonInstall basedpyright, it attempts to use pip. Could you guide me through the process?
hmm, it probably won't work with anything that expects the pypi package unfortunately.
perhaps we could also publish a nodeless release which would allow users on platforms other than windows/mac/linux to use a different node binary
Ok, I am waiting for that.
@DetachHead how do we want to handle this issue? we can't do anything about nodejs-wheel here. do we want to close this issue and open "publish a nodeless release which would allow users on platforms other than windows/mac/linux to use a different node binary"?
there are other issues for supporting other OS's as well. i was just gonna leave them all open until we decide on a solution
If you're using Termux I suggest manage your own language servers, instead of using mason.nvim. There are a couple of language servers couldn't be installed successfully in my experience. For example, some language servers do not provide arm64 binaries, even they can be found in official apt repositories and can be installed manually.
as a workaround, if you install nodejs manually, you can install the basedpyright npm package instead
You can install it through the following steps:
- Install
basedpyrightglobally through npm:
npm i -g basedpyright
~~2. Soft link executables:~~
This step is not required after #953, please wait for npm package release
cd ~/../usr/bin
ln -s ../lib/node_modules/basedpyright/index.js basedpyright
ln -s ../lib/node_modules/basedpyright/langserver.index.js basedpyright-langserver
Then you'll have basedpyright and basedpyright-langserver directly in your PATH, and you're ready to go without that mason package.
Then you'll have
basedpyrightandbasedpyright-langserverdirectly in your PATH, and you're ready to go without that mason package.
If you're on Termux and the language server is installed but still can't be executed, check the header of the executable file:
nvim `which basedpyright`
You'll see the following line:
#!/usr/bin/env node
This will not work unless your Android distribution has /usr/bin/env inside. If so, change the line into:
#!/data/data/com.termux/files/usr/bin/env node
Then do the same thing for basedpyright-langserver.
The Termux environment itself is way too different from a regular Linux system. If these looks too hacky, proot-distro can be used to create a normal Linux environment without root privilege.