From 29d84e20dfbfbd738c13a26701e2cfcb37cf4935 Mon Sep 17 00:00:00 2001 From: "Phúc H. Lê Khắc" Date: Mon, 11 Sep 2023 15:13:31 +0200 Subject: fix(pyright): change diagnosticMode to openFilesOnly #2783 When you go to definition of a library function, pyright will analyze the entire packages to report diagnostic information. This is extremely slow and heavy https://www.reddit.com/r/neovim/comments/135fqp9/why_is_pyright_constantly_analyzing_files_it/ Switch to the default value, similar to in VSCode. --- lua/lspconfig/server_configurations/pyright.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/pyright.lua b/lua/lspconfig/server_configurations/pyright.lua index 2f727418..0f92e1b4 100644 --- a/lua/lspconfig/server_configurations/pyright.lua +++ b/lua/lspconfig/server_configurations/pyright.lua @@ -42,7 +42,7 @@ return { analysis = { autoSearchPaths = true, useLibraryCodeForTypes = true, - diagnosticMode = 'workspace', + diagnosticMode = 'openFilesOnly', }, }, }, -- cgit v1.2.3-70-g09d2