onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.35k stars 300 forks source link

Error spawning pyls unless I am root #2726

Open eyalk5 opened 5 years ago

eyalk5 commented 5 years ago

Oni Version: 0.3.4 Neovim Version (Linux only): Operating System: Mac OS 10.13.2 Issue: When I open a python file, language server is not avaliable for python. That is unless I am root. I get the error : spawn pyls ENONET. When I am root, it works fine. I have installed pyls regularly and can run it without root from cmd line.

oni-bot[bot] commented 5 years ago

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

eyalk5 commented 5 years ago

image

TalAmuyal commented 5 years ago

Can you run pyls from the command-line w/o root and with no configs that will be missing for oni?

On Wed, Feb 20, 2019, 14:42 eyalk5 notifications@github.com wrote:

[image: image] https://user-images.githubusercontent.com/23480511/53092521-a6c89e00-351d-11e9-82da-2ebd609882f7.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/onivim/oni/issues/2726#issuecomment-465558247, or mute the thread https://github.com/notifications/unsubscribe-auth/AE3Ijb3KsUD9ACNQ-sW8SahgCjLAGCYmks5vPUKZgaJpZM4bFH1C .

eyalk5 commented 5 years ago

Indeed. When I simply run pyls from command line, it seems to be working. eyalkarni@xxxx:~$ pyls -v 2019-02-25 01:32:05,154 UTC - INFO - pyls.python_ls - Starting PythonLanguageServer IO language server

TalAmuyal commented 5 years ago

@eyalk5 I'm not completely sure about it, but I do think it's pathing/env-var issue. How about the following in your configs?

  "language.python.languageServer": {"command": "python", "arguments": ["-m", "pyls"]}

For me it works while explicitly stating python3: "language.python.languageServer": {"command": "python3", "arguments": ["-m", "pyls"]}

eyalk5 commented 5 years ago

Thank you. It seems to be working.

eyalk5 commented 5 years ago

OK, it doesn't set the change. When I tried to set (in activate):

 oni.language.python.languageServer.command="python"
  oni.language.python.languageServer.arguments= ["-m", "pyls"]

then it raises an error when trying to upgrade config.js. And keeps using pyls.

When I try to edit config.js :


exports.configuration = {
  "language.python.languageServer": {"command": "python", "arguments": ["-m", "pyls"]}
    //add custom config here, such as
    "ui.colorscheme": "nord",
    //"oni.useDefaultConfig": true,
    //"oni.bookmarks": ["~/Documents"],
    //"oni.loadInitVim": false,
    //"editor.fontSize": "12px",
    //"editor.fontFamily": "Monaco",
    // UI customizations
    "ui.animations.enabled": true,
    "ui.fontSmoothing": "auto"
};

It simply ignores it.

I don't understand. Thanks for the help so far!

eyalk5 commented 5 years ago

image

(The error I get)

TalAmuyal commented 5 years ago

Not sure what's the source of the issue, could you try this config?