Repository navigation
Conversation
…files Register one watcher per workspace folder (a relative pattern if the client supports it, else an escaped glob) and register them again when the folders change. Also watch the configuration file above a folder, an explicit configuration path, the user configuration and every file a loaded configuration extends. Announce in the CLI and the LSP log when the user configuration applies.
This was referenced Oct 24, 2026
…on-files Also use a parking_lot lock for the watched configuration files.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #902 → #895 → #881. Must merge after #881.
The configuration watcher was registered for
rootUrionly (C5), as<rootUri>/**/postgres-language-server.jsoncwith the path pasted into the glob unescaped. In a multi-root workspace, or for a folder added later throughdidChangeWorkspaceFolders, creating, editing or deleting a configuration file was never picked up, and a client that sendsworkspaceFoldersbut norootUrigot no watcher at all. The user configuration (#878) andextendstargets weren't watched either, and nothing told the user that the user configuration was being applied (C16).What changed
RelativePattern { baseUri: <folder>, pattern: "**/postgres-language-server.jsonc" }when the client announcesrelativePatternSupport, else a string glob with the path escaped (*?[{}in brackets,/as separator on Windows). They are registered again after every reload, so added and removed folders are covered.configurationPath, the user configuration paths (also before one exists), and every file a loaded root or nested configurationextends. A change of any of them goes through the debounced reload from perf(workspace): bound nested configuration discovery #895. When a configuration fails to load, the files it extended before stay watched, so fixing it is picked up.Using the user configuration at <path> for <folder>, which has no configuration file.(INFOwindow/logMessage) and the CLI printsUsing the user configuration at <path>to stderr, so it stays out of--reporter jsonandformat --stdin-file-pathoutput.apply_extendsnow returns the files it extended, andLoadedConfigurationcarries them plusis_user_configuration.Tests
the_configuration_files_of_every_workspace_folder_are_watched: norootUri, two folders, both with and withoutrelativePatternSupport; after addingthreeand removingone, the new registration coversthreeand notone.a_change_of_an_extended_file_reloads_the_configuration: editing../shared/base.jsoncoutside the workspace folder changes the severity of an open document.the_user_configuration_and_extended_files_are_watched: the registration lists both.check_announces_the_user_configuration(Unix, viaXDG_CONFIG_HOME): the line is on stderr, not in the JSON report.Not covered
]is left unescaped in string globs; LSP glob syntax has no escape for it, and a lone]is literal.extendstarget can't be watched, because the load fails before it is known; the configuration file itself still is.