So your pylance upgrade very often?
init snap here to rescue.
(defun find-pylance () (let* ((vscode-extensions-directory (expand-file-name ".vscode/extensions" (getenv "UserProfile"))) (pylance-directory (car (seq-filter (lambda (elt) (string-match-p ".*pylance.*" elt)) (directory-files vscode-extensions-directory))))) (concat (file-name-as-directory vscode-extensions-directory) (file-name-as-directory pylance-directory) "dist/server.bundle.js"))) (add-to-list 'eglot-server-programs `(python-mode . ("node" ,(find-pylance) "--stdio"))) (add-hook 'python-mode-hook 'eglot-ensure)
评论
发表评论