Trying to Configure pyls through nvim-lspconfig - neovim

I'm trying to switch from vscode to neovim. I have coc.nvim configured for pyright but now neovim provides native support for language-server. So I tried to configure python-language-server. I have installed pyls by pip install python-language-server. I went through the documentation for lsp-quickstart. It says that I just need to add neovim/nvim-lspconfig to my plugins and then add lua require('lspconfig').pyls.setup{} to my init.vim. After refreshing I'm getting Error:
E5108: Error executing lua [string ":lua"]:1: attempt to index field 'pyls' (a nil value)
I tried googling it but didn't find any relevant answer. Please help me out if you've configured it.

Hey so it looks like there is a new fork of pyls. I had the same issue and the following worked for me!
See Here:
https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#pylsp
And Here:
https://github.com/python-lsp/python-lsp-server
Try:
pip install 'python-lsp-server[all]'
Then in init.vim change:
lua require('lspconfig').pyls.setup{}
to
lua require('lspconfig').pylsp.setup{}
Note: pyls changes to pylsp

Or you can install all packages with package manager in Linux, for instance:
sudo apt-get install python3-pylsp*
Notice * which will install all pylsp packages.

Related

ViennaRNA package's Perl module RNA.pm is required

I am running a toolkit named RNA Framework that requires ViennaRNA to be installed.
I have installed the ViennaRNA 2.4.14 to run a function named rf-fold, However, I constantly receive this error:
[!] Error: ViennaRNA package's Perl module RNA.pm is required.
Please ensure that `ViennaRNA package v2.2.0` (or greater) is installed and try again
When I check the missing RNA.pm module, I can see it is in this path:
/home/user/ViennaRNA/lib/site_perl/5.28.0/
when I check which Perl I am using (type: which Perl) it gives me:
/home/user/perl5/perlbrew/perls/perl-5.28.0/bin/perl
I tried different ways to install the ViennaRNA, including conda install -c bioconda viennarna, compile and make install from ViennaRNA-2.4.14.tar.gz file from the official website. But I cannot get over this error.
I saw a similar issue here and there is a solution (https://www.perlmonks.org/?node_id=1052814), but I don't fully understand the content. Thanks in advance for any help and sorry if it is a basic question!
I think the RNA.pm come with the package, when you download ViennaRNA-2.4.14.tar.gz and install following this link.
So I found my RNA.pm is in the directory:
/share/apps/ViennaRNA-2.1.7/compile-install/lib/site_perl/5.14.2/x86_64-linux-thread-multi/RNA.pm
And I modified the PERL5LIB environment variable by :
export PERL5LIB=/share/apps/ViennaRNA-2.1.7/compile-install/lib/
Problem solved!

Installation of protoc-gen-grpc-web

I am currently working on using grpc-web to write a simple client for my service. I have created a service.proto file which was successfully compiled using protoc. The problem arose when I tried to generate the gRPC-Web service client stub using the plugin protoc-gen-grpc-web which doesnt work despite having installed the latter.
Got the following error :
protoc -I=./ service.proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./
protoc-gen-grpc-web: program not found or is not executable
--grpc-web_out: protoc-gen-grpc-web: Plugin failed with status code 1.
Any suggestions on how to solve this issue? Thank you!
You'll need to make the protoc-gen-grpc-web plugin executable and move it to a directory that is discoverable from your PATH environment variable.
From grpc-web/README:
For example, in MacOS, you can do:
$ sudo mv ~/Downloads/protoc-gen-grpc-web-1.2.1-darwin-x86_64 \
/usr/local/bin/protoc-gen-grpc-web
$ chmod +x /usr/local/bin/protoc-gen-grpc-web
You don't even have to install the plugin globally and make it discoverable from your PATH:
protoc accepts --plugin arguments to point to a required plugin. For protoc-gen-grpc-web (as for many others) there's even npm support, so you can get it with npm i --save-dev protoc-gen-grpc-web and then run protoc with --plugin=protoc-gen-grpc-web=./node_modules/.bin/protoc-gen-grpc-web
I'm using MacOS. You need to install this first with brew
$ brew install protoc-gen-grpc-web
The best solution that I could use for Linux based system was globally installing protoc-gen-grpc-web. This directly takes the files from the /bin of the node_modules files created globally across your system
sudo npm install -g protoc-gen-grpc-web

jspm hot reloading install - command not found after global install

i try to install the hot reload module of jspm using the chokidar-socket-emitter. Installation works like charme, but after that it is not possible to start the watch task as described here: http://jspm.io/0.17-beta-guide/hot-reloading.html
Here is my install log:
XXXXXMacBookPro:dasding xxxxxx$ sudo npm i -g chokidar-socket-emitter
\
fsevents#1.0.12 install /usr/local/lib/node_modules/chokidar-socket-emitter/node_modules/chokidar/node_modules/fsevents
node-pre-gyp install --fallback-to-build
[fsevents] Success: "/usr/local/lib/node_modules/chokidar-socket-emitter/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v14-darwin-x64/fse.node" is installed via remote
chokidar-socket-emitter#0.3.1 /usr/local/lib/node_modules/chokidar-socket-emitter
├── socket.io#1.4.6 (has-binary#0.1.7, debug#2.2.0, socket.io-parser#2.2.6, socket.io-adapter#0.4.0, engine.io#1.6.9, socket.io-client#1.4.6)
└── chokidar#1.5.2 (path-is-absolute#1.0.0, inherits#2.0.1, glob-parent#2.0.0, async-each#1.0.0, is-binary-path#1.0.1, is-glob#2.0.1, readdirp#2.0.0, anymatch#1.3.0, fsevents#1.0.12)
XXXXXMacBookPro:dasding xxxxxx$ chokidar-socket-emitter
bash: chokidar-socket-emitter: command not found
XXXXXMacBookPro:dasding xxxxxx$
Does anyone has any idea why he is unable to find the command? i have no idea how to fix this, global installs always used to work without any problem.
thanks in advance
Ok, in case someone faces the same problem - my current node.js installation was unable to handle the latest version of chokidar-socket-emitter, so a lower version was installed, but the docs refered to the latest version, so there never was a command that could have been found. after updating my node.js installation everything worked like charme.

xrl/nprobe install - command not found

I try to install xrl/nprobe when it is going to install first need to configure with ./configure but in my terminal give "bash: ./configure: No such file or directory" i work with ubuntu 12.04. if you can someone please help me
Do you tried to install via apt-get without the source code?
See:
http://www.nmon.net/apt/

Vagrant cannot install nokogiri-dependent plugins

I'm trying to install the rackspace plugin for vagrant (1.5.1):
vagrant plugin install vagrant-rackspace
But it complains
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing nokogiri (1.6.1), and Bundler
cannot continue. Make sure that gem install nokogiri -v '1.6.1'
succeeds before bundling.
However gem install nokogiri -v '1.6.1' and /Applications/Vagrant/embedded/bin/gem install nokogiri -v '1.6.1' both work.
I've looked at a bunch of SO threads and blog posts. Things I've tried that have not worked
Running xcode-select --install
Installing full xcode
brew install gcc-4.2
Remove rvm and rvm version of ruby
Install nokogiri w/ built-in (mac) ruby and vagrant-embedded ruby
Despite the fact that nokogiri installs fine (#5 above) without sudo on both counts, vagrant plugin install vagrant-rackspace still fails...
So, in summary, I can install the nokogiri plugin, however I cannot install the vagrant rackspace plugin, can you help me get the plugin installed?
Related threads
Error to install Nokogiri on OSX 10.9 Maverick?
nokogiri - ERROR: Failed to build gem native extension
Full output of vagrant plugin install vagrant-rackspace --debug
I'm on OSX Mavericks and this worked for me:
Set as environment property:
NOKOGIRI_USE_SYSTEM_LIBRARIES=1
Then install as usual:
vagrant plugin install vagrant-rackspace
Vagrant ships with embedded Ruby and isolated gem environment. So installing gems manually to your "normal" gem environment won't help.
The first issue is that you should never use sudo to run any vagrant command. If possible, please remove ~/.vagrant.d/ or at least chown it recursively back to your own user. You could also try upgrading Vagrant to v1.5.1.
Then please gist/pastebin the output of vagrant plugin install vagrant-rackspace --debug and ~/.vagrant.d/gems/gems/nokogiri-1.6.1/ext/nokogiri/mkmf.log.
The posted solutions didn't work for me. Instead I needed to specify the libxml2, libxslt and libiconv that I installed with homebrew (Do this first).
I installed the gem manually with the embedded ruby with the following [very concise] command line:
/Applications/Vagrant/embedded/bin/gem install \ # select the embedded ruby
--install-dir ~/.vagrant.d/gems \ # install to the vagrant dir
nokogiri -v '1.6.2.1' -- \ # pass options to nokogiri install
--with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 \
--with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib \
--with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 \
--with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include \
--with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
This worked for me on Mavericks and Vagrant 1.6.1:
CC=/usr/bin/gcc vagrant plugin install vagrant-rackspace
I tried NOKOGIRI_USE_SYSTEM_LIBRARIES=1 but got an error saying that system libxml2 is too old.
Warning: This is a super-hacky solution, though it's hard to call it that.
Yesterday I installed Vagrant on another OSX Mavericks box. Like many other posts I read on SO "all I had to do" was run xcode-select --install and bingo vagrant plugin install vagrant-rackspace worked like a charm.
Today I was mired down in the Bundler code again when it dawned on me that since this is an isolated ruby environment why not nuke my ~/.vagrant.d directory and copy the same directory from the successful build on the other box...
The result? A working vagrant rackspace on my laptop! I'm not sure I'll ever figure out what was really wrong, but if anyone wants a shot at the 100 point bounty, I'm still open to suggestions!
In my case the nokogiri folders and their files located in ~/vagrant.d/gems/gems had wrong rights (user/group).
After changing them to username:staff (username being your console user name), it works like a charm.
Similarly with my case, I have an issue while installing vagrant-omnibus plugin for Vagrant 1.6.3 on OSX Mavericks 10.9.4 and ruby 2.0.0p247 rbenv.
I tried setting the env NOKOGIRI_USE_SYSTEM_LIBRARIES to 1 or true, then update+install but the same error still there.
I found that there is a suggestion in https://github.com/mitchellh/vagrant/issues/3769 to use the specify the baked in nokogiri version and this works for me. So, I also wrote a quick noted for myself to refer this unfortunates issue.
If Nate Murray's solution doesn't work, I found upgrading to a Vagrant version > 1.6.4 fixed the issue (as noted in this Github issue: https://github.com/mitchellh/vagrant/issues/3769)
in my case while trying to install vagrant-parallels, i had to check the Command line tools folder had an error in the naming for some reason. Fixing that allowed nokigiri to work well