Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Pass Python environment as parameter #1938

Closed
@LanderMoerkerke

Description

@LanderMoerkerke

I use mspyls with Neovim Language Client. The settings are statically defined in a settings.json and so is the InterpreterPath. I work with a lot of virtual environments so I want to define my Python binary location based on the project I'm working in.

settings.json

{
  "enabled": true,
  "initializationOptions": {
    "displayOptions": {
      "preferredFormat": "markdown",
      "trimDocumentationLines": true,
      "maxDocumentationLineLength": 0,
      "trimDocumentationText": true,
      "maxDocumentationTextLength": 0
    },
    "interpreter": {
      "properties": {
        "InterpreterPath": "/usr/bin/python",
        "UseDefaultDatabase": true,
        "Version": "3.8"
      }
    }
  }
}

Now my question arises, is it possible to define the InterpreterPath using terminal arguments?

For example:

dotnet /usr/local/lib/microsoft-python-language-server/Microsoft.Python.LanguageServer.dll \
    --python /usr/local/bin/python

Or is there a more simpler solution to my problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions