[分享]关于Eglot在Windows系统下无法使用pyright的问题

 ;; Python: pyright
   (use-package lsp-pyright
     :preface
     ;; Use yapf to format
     (defun lsp-pyright-format-buffer ()
       (interactive)
       (when (and (executable-find "yapf") buffer-file-name)
         (call-process "yapf" nil nil nil "-i" buffer-file-name)))
     :hook (python-mode . (lambda ()
                            (require 'lsp-pyright)
                            (add-hook 'after-save-hook #'lsp-pyright-format-buffer t t)))
     :init (when (executable-find "python3")
             (setq lsp-pyright-python-executable-cmd "python3")))

有补全,但是在补全函数和方法时,不会补全参数,比如

class Test:
    def say(self):
          pass
t = Test()

补全时,不会自动补全t.say() 结果是t.say 如果函数带参数,则一样。 out