doom-emacs Python用lsp-pyright时LSP提示UriError

如果使用pyright就会提示这个,不用pyright使用默认的lsp-python-ms一切正常

mssage里显示的是这个

Doom loaded 215 packages across 36 modules in 1.478s
Loading /Users/Yueyec/.emacs.d/.local/cache/recentf…done
LSP :: Guessed project root is //Users/Yueyec/Documents/python-data
LSP :: Connected to [pyright:4089/starting].
LSP :: Error from the Language Server: Request initialize failed with message: [UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (“//”) (Internal Error)


lsp-log显示内容是这个

Command “/usr/local/bin/pyright-langserver --stdio” is present on the path.
Command “pyls” is present on the path.
Command “pylsp” is not present on the path.
Command “/usr/local/bin/pyright-langserver --stdio” is present on the path.
Command “pyls” is present on the path.
Command “pylsp” is not present on the path.
Command “/usr/local/bin/pyright-langserver --stdio” is present on the path.
Command “pyls” is present on the path.
Command “pylsp” is not present on the path.
Found the following clients for //Users/Yueyec/Documents/python-data/temp.py: (server-id pyright, priority 3), (server-id pyls, priority -2)
The following clients were selected based on priority: (server-id pyright, priority 3)
Pyright language server 1.1.155 starting
Server root directory: /usr/local/lib/node_modules/pyright/dist/

命令行里 pyright temp.py 是否正常呢

正常

$ pyright temp.py
No configuration file found.
No pyproject.toml file found.
stubPath /Users/Yueyec/Documents/python-data/typings is not a valid directory.
Assuming Python platform Darwin
Searching for source files
Found 1 source file
0 errors, 0 warnings, 0 infos
Completed in 0.611sec

vscode里使用pyright也正常