diff options
| author | Serhii Tereshchenko <serg.partizan@gmail.com> | 2023-07-20 14:54:25 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-20 19:54:25 +0800 |
| commit | 6c53bf7fb02a2de7e7c84be7a2bd7a502f66a802 (patch) | |
| tree | 371ca9c765a595a523c1ec49a73a4ef4dcee3390 | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-6c53bf7fb02a2de7e7c84be7a2bd7a502f66a802.tar nvim-lspconfig-6c53bf7fb02a2de7e7c84be7a2bd7a502f66a802.tar.gz nvim-lspconfig-6c53bf7fb02a2de7e7c84be7a2bd7a502f66a802.tar.bz2 nvim-lspconfig-6c53bf7fb02a2de7e7c84be7a2bd7a502f66a802.tar.lz nvim-lspconfig-6c53bf7fb02a2de7e7c84be7a2bd7a502f66a802.tar.xz nvim-lspconfig-6c53bf7fb02a2de7e7c84be7a2bd7a502f66a802.tar.zst nvim-lspconfig-6c53bf7fb02a2de7e7c84be7a2bd7a502f66a802.zip | |
fix(pyright): fix root_dir detection (#2727)
| -rw-r--r-- | lua/lspconfig/server_configurations/pyright.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/lspconfig/server_configurations/pyright.lua b/lua/lspconfig/server_configurations/pyright.lua index 2ad03761..2ae18dca 100644 --- a/lua/lspconfig/server_configurations/pyright.lua +++ b/lua/lspconfig/server_configurations/pyright.lua @@ -33,8 +33,8 @@ return { default_config = { cmd = { 'pyright-langserver', '--stdio' }, filetypes = { 'python' }, - root_dir = function() - return util.root_pattern(unpack(root_files))() or vim.loop.cwd() + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) or vim.loop.cwd() end, single_file_support = true, settings = { |
