Skip to content

LSP does not file watch custom-named configs #4879

Description

@dillydill123

Describe the Bug

We have a user.pyrefly.toml which is generated from pyrefly.toml. It's generated because of our mono repo setup with bazel. Our LSP setting python.pyrefly.configPath points to the relative path of this custom user config. It has absolute paths to site-package-path pointing into the bazel cache.

01:07 Dillon:~/sbx/demos/lsp2 $ tree -a .
.
├── .vscode
│   └── settings.json
├── configs
│   ├── pyrefly.toml
│   └── user.pyrefly.toml
└── test.py

settings.json

{
    "python.pyrefly.configPath": "configs/user.pyrefly.toml"
}

pyrefly.toml and user.pyrefly.toml contain:

preset = "strict"
errors.explicit-any = "ignore"

project-includes = [
    "/home/dillon/sbx/demos/lsp2/**/*.py",
    "/home/dillon/sbx/demos/lsp2/*.py",
]

test.py:

from typing import Any
x: Any

If "python.pyrefly.configPath": "configs/user.pyrefly.toml", I see nothing, only after ctrl + shift + p > Pyrefly: Restart Pyrefly Client do updates occur. But if "python.pyrefly.configPath": "configs/pyrefly.toml", File watching works as expected. I would test this by swapping errors.explicit-any = "ignore" to errors.explicit-any = "error" and seeing if the LSP would show the error immediately or if it required a client restart.

I assume the name user.pyrefly.toml is causing it to not be watched?

This is with LSP version 1.2.9004 and VSCode 1.137.0

Image

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

Pyrefly Extension: 1.2.9004

VSCode:

Version: 1.137.0 (user setup)
Commit: 645f29cc3176500b4b5762ba887cf2a7f0ffdf2c
Date: 2026-09-08T13:43:59-07:00
Electron: 42.10.0
ElectronBuildId: 15109253
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
@github/copilot: 1.0.84.70.gdb75d0d
@github/copilot-sdk: 1.0.13-preview.4
OS: Windows_NT x64 10.0.19045

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions