๐ŸŒ
GitHub
github.com โ€บ emacs-lsp โ€บ lsp-pyright
GitHub - emacs-lsp/lsp-pyright: lsp-mode pyright ยท GitHub
(use-package lsp-pyright :ensure t :custom (lsp-pyright-langserver-command "pyright") ;; or basedpyright :hook (python-mode .
Starred by 324 users
Forked by 27 users
Languages ย  Emacs Lisp 97.2% | Makefile 2.8%
Discussions

python - Unable to setup lsp-mode with lsp-pyright - Emacs Stack Exchange
According to this, lsp-mode and lsp-pyright are the only necessary parts to run LSP for Python in Emacs. Now, in my current setup, whenever I run Emacs (from Applications) and open a .py file, I get this in my minibuffer: Unable to find installed server supporting this file. More on emacs.stackexchange.com
๐ŸŒ emacs.stackexchange.com
python language server - How to use lsp-pyright in emacs? - Stack Overflow
I want python language server support with auto completion and syntax highlighting. I cloned the lsp-pyright repo from their github-page. After that, I wanted to load the path and use it. But someh... More on stackoverflow.com
๐ŸŒ stackoverflow.com
python lsp server - lsp-pyright with portable setup - Emacs Stack Exchange
i have a problem with my portable emacs 30.1 setup on Win11. The portable python worked as expected. With M-x run python the shell runs. Pyright is installed, but lsp-pyright didn't recognized it. I More on emacs.stackexchange.com
๐ŸŒ emacs.stackexchange.com
August 6, 2025
python - How to set up pyrightconfig in lsp-pyright? - Emacs Stack Exchange
I am using lsp-pyright[1] module in doom Emacs for Python major mode. Local imports from my project are not recognized by lsp server. I have created a pyrightconfig.json file in root directory of my More on emacs.stackexchange.com
๐ŸŒ emacs.stackexchange.com
๐ŸŒ
GitHub
github.com โ€บ sublimelsp โ€บ LSP-pyright
GitHub - sublimelsp/LSP-pyright: Python support for Sublime's LSP plugin provided through microsoft/pyright. ยท GitHub
From Preferences > Package Settings > LSP > Servers > LSP-pyright
Starred by 156 users
Forked by 14 users
Languages ย  Python
๐ŸŒ
GitHub
emacs-lsp.github.io โ€บ lsp-pyright
LSP Pyright
(use-package lsp-pyright :ensure t :custom (lsp-pyright-langserver-command "pyright") ;; or basedpyright :hook (python-mode .
๐ŸŒ
Claude
claude.com โ€บ plugins โ€บ pyright-lsp
Pyright LSP โ€“ Claude Plugin | Anthropic
Python language server (Pyright) for type checking and code intelligence. Install this plugin to extend your workflow.
๐ŸŒ
Medium
medium.com โ€บ @chrisatmachine โ€บ lunarvim-advanced-pyright-lsp-configuration-usage-665a14decb77
LunarVim Advanced Pyright LSP Configuration & Usage | by chris@machine | Medium
May 4, 2023 - Weโ€™ll begin by overriding the pyright language server defaults that LunarVim ships with. While the defaults are probably fine for the average user, for this article we want to be in full control of the language server. vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" })
Find elsewhere
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 76249761 โ€บ how-to-use-lsp-pyright-in-emacs
python language server - How to use lsp-pyright in emacs? - Stack Overflow
(setq inhibit-startup-screen t) (menu-bar-mode 0) (tool-bar-mode 0) (scroll-bar-mode 0) (custom-set-variables '(custom-safe-themes '("d80952c58cf1b06d936b1392c38230b74ae1a2a6729594770762dc0779ac66b7" default)) '(package-selected-packages '(el-search treeview gruvbox-theme eglot))) (custom-set-faces) ;;evil (add-to-list 'load-path "~/.emacs.d/evil/") (require 'evil) (evil-mode 1) ;;tabstop (setq-default tab-width 4) ;;clangd (require 'eglot) (add-to-list 'eglot-server-programs '((c++-mode c-mode) "clangd")) (add-hook 'c-mode-hook 'eglot-ensure) (add-hook 'c++-mode-hook 'eglot-ensure) ;;emacs theme (load-theme 'gruvbox-dark-hard t) ;; (add-to-list 'load-path "~/.emacs.d/vendor/pymacs-0.24-beta2") ;; (require 'pymacs) ;; (pymacs-load "ropemacs" "rope-") ;; (setq ropemacs-enable-autoimport t) ;; pyright (add-to-list 'load-path "~/.emacs.d/lsp-pyright/") (require 'lsp-pyright)
๐ŸŒ
ClaudePluginHub
claudepluginhub.com โ€บ home โ€บ lsp servers โ€บ pyright
Claudepluginhub
{ "lspServers": { "pyright": { "command": "pyright-langserver", "extensionToLanguage": { ".py": "python", ".pyi": "python" }, "args": [ "--stdio" ] } } }
๐ŸŒ
Stack Exchange
emacs.stackexchange.com โ€บ questions โ€บ 84852 โ€บ lsp-pyright-with-portable-setup
python lsp server - lsp-pyright with portable setup - Emacs Stack Exchange
August 6, 2025 - (setq python-shell-interpreter "~/.emacs.d/python/python.exe") (use-package lsp-pyright :ensure t :custom (lsp-pyright-langserver-command "pyright") ;; or basedpyright :hook (python-mode .
๐ŸŒ
Basedpyright
docs.basedpyright.com โ€บ v1.21.0 โ€บ installation โ€บ ides
IDEs - basedpyright
(setq lsp-pyright-langserver-command "basedpyright") ... configure it to use basedpyright by specifying the path to the basedpyright-langserver executable and set "Running mode" to "LSP4IJ": Install the LSP server itself, using the pypi package installation method (as mentioned previously in this section).
Top answer
1 of 2
2

You can include additional Python source paths with lsp-pyright-extra-paths. Here is my pyrightconfig.json for a project.

{
  "exclude": ["**/node_modules", "**/__pycache__"],
  "ignore": ["**/node_modules", "**/__pycache__"],
  "include": ["flextensor", "tvm"]
  "pythonPlatform": "Linux",
  "pythonVersion": "3.6",
  "reportMissingImports": true,
  "reportMissingTypeStubs": false,
  "stubPath": "typings",
  "typeCheckingMode": "basic",
  "venvPath": "/home/swarnendu/tmp/virtualenvs",
  "venv": "flextensor-venv"
}

Here is my Emacs setup (init.el) for pyright (ignoring remote Tramp setup). You could also use use-package for this.

  (when (executable-find "pyright")
    (unless (fboundp 'lsp-pyright-locate-python)
      (autoload #'lsp-pyright-locate-python "lsp-pyright" nil t))
    (unless (fboundp 'lsp-pyright-locate-venv)
      (autoload #'lsp-pyright-locate-venv "lsp-pyright" nil t))

    (add-hook 'python-mode-hook (lambda ()
                                  (require 'lsp-pyright)
                                  (lsp-deferred)))

    (defvar lsp-pyright-python-executable-cmd)
    (setq lsp-pyright-python-executable-cmd "python3")))

Here is the .dir-locals.el for the same project.

(
 (python-mode . (
                 (pyvenv-activate . "/home/swarnendu/tmp/virtualenvs/flextensor-venv")
                 (eval . (let (
                               (paths
                                (vconcat (list
                                          (expand-file-name "flextensor" (projectile-project-root))
                                          (expand-file-name "tvm" (projectile-project-root))
                                          ))))
                           (setq lsp-pyright-extra-paths paths)))
                 ))
 )

Please check whether a similar setup works for you.

2 of 2
0

Have you checked if your pyrightconf.json file is actually found ?

You can check by skimming the log buffer for the lsp session

C-x C-b should give you a list of buffers

You can look for "window" as a keyword. In fact if the file is found or not is sent by the server in a "window" type message

  1. If your conf file is found, than it's a matter of properly filling it in
  2. If it's not, it's a matter of adding/removing roots from your lsp session (lsp-workspace-folder-add/remove)
๐ŸŒ
GitHub
github.com โ€บ jsadusk โ€บ pylsp-pyright
GitHub - jsadusk/pylsp-pyright: Plugin to integrate pyright/basedpyright with python-lsp-server ยท GitHub
Plugin for pylsp to to type checking via pyright/basedpyright ยท This is a plugin for Python LSP Server.
Author ย  jsadusk
๐ŸŒ
Reddit
reddit.com โ€บ r/emacs โ€บ new(ish) python lsp server which works with emacs: basedpyright
r/emacs on Reddit: New(ish) Python LSP server which works with Emacs: basedpyright
January 24, 2025 -

A new to me LSP server for Python has appeared: basedpyright. This is a fork of the fast pyright langserver which Microsoft develops, with a more OSS philosophy. It has lots of improvements bringing it close to (and in some cases surpassing) the proprietary, MS VSCode-only LSP server pylance which wraps pyright:

Basedpyright is a fork of pyright with various type checking improvements, improved vscode support and pylance features built into the language server.

You can read about all the improvements over pyright. The one most meaningful to me is "docstrings for compiled builtin modules". E.g. docs with eglot go from:

pyright:

class range(
    stop: SupportsIndex,
    /
)

to

basedpyright:

class range(
    stop: SupportsIndex,
    /
)

range(stop) -> range object
range(start, stop[, step]) -> range object

Return an object that produces a sequence of integers from start (inclusive)
to stop (exclusive) by step.  range(i, j) produces i, i+1, i+2, ..., j-1.
start defaults to 0, and stop is omitted!  range(4) produces 0, 1, 2, 3.
These are exactly the valid indices for a list of 4 elements.
When step is given, it specifies the increment (or decrement).

Recent eglot versions already support it: just pip install basedpyright. Works fine with lsp-booster and all the normal settings.

๐ŸŒ
Kodezi
blog.kodezi.com โ€บ pyright-vs-python-lsp-server-key-features-and-performance-insights
Pyright vs Python-LSP-Server: Key Features and Performance Insights
August 13, 2025 - Pyright excels in static type checking and delivers exceptional performance, making it ideal for those managing large codebases and prioritizing reliability. On the other hand, Python-LSP-Server enhances the development experience through rich integration capabilities and comprehensive features such as auto-completion and error checking.
๐ŸŒ
robbmann
robbmann.io โ€บ posts โ€บ emacs-eglot-pyrightconfig
Virtual Environments with Eglot, Tramp, and Pyright ยท robbmann
December 31, 2022 - My most reliable setup for developing Python projects on remote hosts with LSP support so far has been with eglot and pyright. Iโ€™ve also tried lsp-mode with pyright, and both of lsp-mode and eglot with the python-lsp-server, however Iโ€™ve landed on eglot + pyright for a few reasons: