Giter Club home page Giter Club logo

Comments (5)

jdtsmith avatar jdtsmith commented on June 14, 2024 2

Right, and my point was that lsp-pyright shouldn't try to find an interpreter at all, since pyright itself will do so if it doesn't have one specifically configured (e.g. with pythonVersion = "3.9" or so).

from lsp-pyright.

Typas avatar Typas commented on June 14, 2024

I think the problem of lsp-pyright is from lsp-pyright-locate-python. It tries to find executable first from bin/python, whilst python from homebrew usually places executable (link) in /usr/local/bin/python for Python 2 and /usr/local/bin/python3 for Python 3.

from lsp-pyright.

ivan-avalos avatar ivan-avalos commented on June 14, 2024

Argh, I just ended up directly editing the lsp-pyright.el file in the .emacs.d directory.

(defun lsp-pyright-locate-python ()
  "Look for python executable cmd to the workspace."
  (executable-find "/bin/python3"))
  ;; (or (executable-find (f-expand "bin/python" (lsp-pyright-locate-venv)))
  ;;     (with-no-warnings
  ;;       (if (>= emacs-major-version 27)
  ;;           (executable-find lsp-pyright-python-executable-cmd lsp-pyright-prefer-remote-env)
  ;;         (executable-find lsp-pyright-python-executable-cmd)))))

Did you manage to solve it in a better way?

from lsp-pyright.

jdtsmith avatar jdtsmith commented on June 14, 2024

I switched to eglot.

from lsp-pyright.

jtamagnan-delphix avatar jtamagnan-delphix commented on June 14, 2024

@ivan-avalos I created a PR to allow us to more easily configure this behavior - #89 - LMK if you think this would help solve your problem without needing to modify the source code. Hopefully it will be more robust long term

from lsp-pyright.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.