-
Notifications
You must be signed in to change notification settings - Fork 273
Closed
Description
Describe the bug
Microsoft's Pyright language server dies shortly after it is launched. I checked how ALE integrated it and I don't see anything special
Environment
- neovim/vim version (
nvim --version
orvim --version
): 0.4.4 - This plugin version (
git rev-parse --short HEAD
): 0.1.158 - This plugin's binary version (
bin/languageclient --version
): 0.1.158 - Minimal vimrc content (A minimal vimrc is the smallest vimrc that could
reproduce the issue. Refer to an example [here][min-vimrc.vim]):
augroup filetype_python
autocmd!
autocmd BufReadPost *.py setlocal filetype=python
augroup END
let g:LanguageClient_serverCommands = {
\ 'python': ['pyright-langserver', '--stdio'],
\ }
- Language server link and version: 1.1.73
To Reproduce
Open and try to edit a Python file
Current behavior
Inmediately LanguageClient echoes: failed to parse semantic scopes: invalid type: map, expected a boolean
. No diagnostics are shown and completion doesn't work
Expected behavior
Looks like Pyright is killed by the semantic scopes. Is there a way to disable them? I looked in the docs but I didn't find anything
Additional context
This is the LanguageClient log
#######
LanguageClient 0.1.158
#######
09:29:53 WARN unnamed src/language_server_protocol.rs:1079 Failed to get initializationOptions: Failed to read file (/Users/tae/service-end-to-end-tests/.vim/settings.json)
09:29:53 ERROR unnamed src/language_server_protocol.rs:1221 LanguageClient: failed to parse semantic scopes: invalid type: map, expected a boolean
invalid type: map, expected a boolean
09:29:53 WARN unnamed src/language_server_protocol.rs:3903 Failed to get workspace settings: Failed to read file (/Users/tae/service-end-to-end-tests/.vim/settings.json)
09:29:53 WARN unnamed src/language_server_protocol.rs:2980 Failed to start language server automatically. invalid type: map, expected a boolean
09:29:53 ERROR unnamed src/rpchandler.rs:26 Error handling message: No path was found.
Message: {"jsonrpc":"2.0","method":"client/registerCapability","params":{"registrations":[{"id":"0482c96f-7096-4f78-8b4a-535d6c75576e","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/pyrightconfig.json","kind":7},{"globPattern":"**/mspythonconfig.json","kind":7},{"globPattern":"**/*.{py,pyi}","kind":7}]}}]},"id":0}
Error: No path was found.
09:29:56 ERROR unnamed src/rpchandler.rs:45 Error handling message: invalid type: map, expected a boolean
Message: {"jsonrpc":"2.0","method":"languageClient/handleTextChanged","params":{"bufnr":1,"filename":"/Users/tae/service-end-to-end-tests/tests/test_ifc_upload_large_001.py","languageId":"python"}}
Error: invalid type: map, expected a boolean
And this is Pyright's log
(node:2946) UnhandledPromiseRejectionWarning: Error: No path was found.
at /nix/store/gc1vv71s8ipxravpz87fzij377xg5k2j-node_pyright-1.1.73/lib/node_modules/pyright/dist/vendor.js:2:113920
at /nix/store/gc1vv71s8ipxravpz87fzij377xg5k2j-node_pyright-1.1.73/lib/node_modules/pyright/dist/vendor.js:2:114214
at Immediate.<anonymous> (/nix/store/gc1vv71s8ipxravpz87fzij377xg5k2j-node_pyright-1.1.73/lib/node_modules/pyright/dist/vendor.js:2:114577)
at processImmediate (internal/timers.js:456:21)
(node:2946) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:2946) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Metadata
Metadata
Assignees
Labels
No labels